SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program,

Slides:



Advertisements
Similar presentations
CRC Before you can build an object-oriented system, you have to define the classes (objects) that represent the problem to be solved, how the classes relate.
Advertisements

OBJECT-ORIENTED Design
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Introduction to Object-Oriented Programming CS 21a: Introduction to Computing I First Semester,
Introduction To System Analysis and Design
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Lecture 4 Class Responsibility Collaboration Cards
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Lecture 3 Object Concepts II
Object Oriented Concepts in Java Objects Inheritance Encapsulation Polymorphism.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Teamwork Know each other Compete Leadership Strengths and Weaknesses
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Options for User Input Options for getting information from the user –Write event-driven code Con: requires a significant amount of new code to set-up.
Introduction To System Analysis and design
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
The Design Discipline.
Programming Languages and Paradigms Object-Oriented Programming.
Object-Oriented Software Testing. C-S 5462 Object-Oriented Software Testing Research confirms that testing methods proposed for procedural approach are.
CS2110: SW Development Methods Design of methods (functions) Class design – CRC cards – UML class and sequence diagrams Software Design.
BCS 2143 Introduction to Object Oriented and Software Development.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
CS212: Object Oriented Analysis and Design Lecture 4: Objects and Classes - I.
Java Classes Using Java Classes Introduction to UML.
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
1.  At the end of this slide, student can:  Explore tools, features, properties and interface of the Textpad.  Creating a new project.  Open and run.
Introduction To System Analysis and Design
Object Oriented Design Jerry KotubaSYST Object Oriented Methodologies1.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
1 Programming Fundamentals AITI-GP. 2 Introduction to Programming.
Chapter 17 GRASP: Designing Objects with Responsibilities. 1CS6359 Fall 2011 John Cole.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Object-Oriented Design Part 2
Cohesion and Coupling CS 4311
Systems Analysis and Design in a Changing World, 3rd Edition
CSCI 383 Object-Oriented Programming & Design Lecture 8 Martin van Bommel.
Lecture 3 : Object Oriented Design (chapter 3. of Timothy Budd’s “Intro to OOP” book) Acknowledgement : courtesy of Prof. Timothy Budd lecture slides.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
1 Testing Object- Oriented Programs CS 4311 J. McGregor and D. Sykes. A Practical Guide to Testing Object-Oriented Software, Addison-Wesley, I. Burnstein.
Object-Oriented Principles Applications to Programming.
9 - Class & Method Design Model Enhancement Design to Code Proposal Presentation.
CSCI-383 Object-Oriented Programming & Design Lecture 7.
OOP Review CS 124.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
UML (Unified Modeling Language)
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
Lecture 3 : Object Oriented Design (chapter 3
310414IMPLEMENTATION1 IMPLEMENTATIONIMPLEMENTATION SOFTWARE ENGINEERING SOFTWARE ENGINEERING.
Object-Oriented Systems. Goals Object-Oriented Methodologies – The Rumbaugh et al. OMT – The Booch methodology – Jacobson's methodologies.
CSC 222: Object-Oriented Programming
CSC 222: Object-Oriented Programming
CSC 222: Computer Programming II
Chapter 1 Introduction to Computers, Programs, and Java
Testing Object-Oriented Programs
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Creating and Using Classes
Object Oriented Analysis and Design
INFS 6225 – Object-Oriented Systems Analysis & Design
Object Oriented Programming
CS2011 Introduction to Programming I Objects and Classes
COP 3330 Object-oriented Programming in C++
Presentation transcript:

SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program, using the class library import/export VAJ code OOP ConceptsAbilities & Skills Object, Class, Type Methods, Messages Behavior-based Design Class library, hierarchy Claims for Java Reading Budd, Ch 1-3, 4 Asst (due next Mon) represent the design for ClickMe as CRC Cards (lab pair hand in) do programs and exercises for Ch. 4 (individual, no hand in)

SOS OOP Fall 2001 Object, Class, Type Object - an encapsulation of state and behavior Attributes Class, Instance, Hierarchy Abstract classes Information hiding

SOS OOP Fall 2001 Methods, Messages Behavior How different from a procedure call Method binding Polymorphism Method overriding Exception handling

SOS OOP Fall 2001 Responsibility-Driven Design Delegate to a class, responsibility for a task Components & Reuse Component-Responsibility-Collaborators “The major problem in software development: management of details and communication of information between diverse portions of the project.” Component Collaborators responsibility …. class ….

SOS OOP Fall 2001 Interactive Kitchen Helper –A PC based application that replaces index-card recipes and assists in meal planning for a period of time (e.g., a week). User actions –Browse recipe database –Create menus System services –Scale recipes for number of servings –Print out menus for a week, day or meal –Print grocery list Work with 5 others to finish the IKH CRC design (each person play role of one component) (see p. 39)

SOS OOP Fall 2001 CRC Cards for Interactive Kitchen Helper Greeter Collaborators DB Manager Plan Manager Display initial msg Offer option choice Pass control DB Mgr Plan Mgr Plan Manager Collaborators Date Recipe Database Collaborators Date Collaborators PlanManager Meal Maintain info about specific date date (year,month, day) -- create new date displayAndEdit() -- display date info in window, allow user to edit entries buildGroceryList (List&) -- add items from all menus to grocery list Meal Collaborators Recipe Collaborators

SOS OOP Fall 2001 Interaction Diagrams GreeterDatabaseRecipePlannerComment browse() display() makePlan()

SOS OOP Fall 2001 Design Process Characterize behavior of the entire application. Refine the specification. –“look and feel” –Determine high level structure, mapping activities onto components Identify high level system components What-who cycle. Scenarios. Documentation & user manual system design documentation arguments for/against design alternatives project schedule and project diary (status reports) formalize the interface Define information required by and maintained within each component Review components and interface names. Assign 1+ component to team members to design data structure(s) and algorithm(s) for each method. Implementation Identify “facilitator” components. Characterize & document component preconditions; Unit test. Integration.

SOS OOP Fall 2001 Design and Development Hints When is a component “too big” or small? Anticipate change Isolate s/w from hardware Reduce coupling Component should have high cohesion Maintain records of design process Names should be [Keller 1990]: Integrate iteratively, using stubs. Use regression testing.

SOS OOP Fall 2001 Is Java the “silver bullet”? Client-side computing Simple O-O to the core  Network savvy.  Interpreted.  Robust.  Secure.  Architecture neutral.  Portable.  High performance  Multithreaded  Dynamic Be prepared to argue for or against these with specific language features and code

SOS OOP Fall 2001 In Lab Tomorrow… Work with your partner in the ACC Gain familiarity with VAJ, take home a copy ClickMe (w/ modifications) –advanced students to start on BallWorld in VAJ Assignment due Monday -- CRC cards for ClickMe

SOS OOP Fall 2001 Java Program Structure public static void main ( String [ ] args) { } access modifiers return type method name arguments type public class BankAccount { private int accountBalance = 0; public void display() { System.out.println ("the current account balance is " + accountBalance); } public void main(String[] args) { deposit (15); withdrawal (10); display(); // System.out.println(accountBalance); } public void withdrawal (int amount) { accountBalance = accountBalance - amount; }

SOS OOP Fall 2001 A simple class -- BankAccount public class BankAccount { private int accountBalance = 0; public void display() { System.out.println ("the current account balance is " + accountBalance); } public void main(String[] args) { deposit (15); withdrawal (10); display(); } public void withdrawal (int amount) { accountBalance = accountBalance - amount; }