240 3/30/98 CSE 143 Object-Oriented Design [Chapter 10]

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

CHAPTER 1 SOFTWARE DEVELOPMENT. 2 Goals of software development Aspects of software quality Development life cycle models Basic concepts of algorithm.
Stéphane Ducasse2.1 OOP? What is OOP? Why? OOP in a nutshell.
Ch 12: Object-Oriented Analysis
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
Software Design by Dr. Eitan Hadar Web:
Chapter 1 Principles of Programming and Software Engineering.
Software Lifecycle A series of steps through which a software product progresses Lifetimes vary from days to months to years Consists of –people –overall.
Visual Basic Introduction IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Computer Science 240 Principles of Software Design.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
The chapter will address the following questions:
Introduction To System Analysis and design
(c) University of Washington04-1 CSC 143 Java Inheritance Example (Review)
2 Approaches to Requierements Engineering Reference: Systems Analysis and Design in a Changing World, 3 rd Edition, chapter 2 and chapter 6.
Chapter 2: Approaches to System Development
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GRASP Principles. How to Design Objects The hard step: moving from analysis to design How to do it? –Design principles (Larman: “patterns”) – an attempt.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
1 SYS366 Lecture 1: Introduction to Systems. 2 What is Software Development? Software Development implies developing some software – but it does not involve.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Review: Cohesion and Coupling, Mutable, Inheritance Screen Layouts Software methodologies – Extreme Programming Object-Oriented Design – CRC Cards - UML.
SE: CHAPTER 7 Writing The Program
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
1 ISA&D7‏/8‏/ ISA&D7‏/8‏/2013 Methodologies of the SDLC Traditional Approach to SDLC Object-Oriented Approach to SDLC CASE Tools.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
The Systems Development Life Cycle
CSE 303 – Software Design and Architecture LECTURE 4.
GRASP: Designing Objects with Responsibilities
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
1 Software Development Software Engineering is the study of the techniques and theory that support the development of high-quality software The focus is.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
Information System Design (IT60105) Lecture 26 Object-Oriented System Testing.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Learners Support Publications Object Oriented Programming.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Topic 4 - Database Design Unit 1 – Database Analysis and Design Advanced Higher Information Systems St Kentigern’s Academy.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
1 SYS366 Week 1 - Lecture 1 Introduction to Systems.
From the customer’s perspective the SRS is: How smart people are going to solve the problem that was stated in the System Spec. A “contract”, more or less.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
1 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
Unit 1 - Introducing Abstract Data Type (ADT) Part 1.
Principles of Programming & Software Engineering
Approaches to Information Systems Development
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Principles of Programming and Software Engineering
Part 3 Design What does design mean in different fields?
About the Presentations
Life Cycle Models PPT By :Dr. R. Mall.
OBJECT ORIENTED PROGRAMMING overview
The Object-Oriented Thought Process Chapter 06
OOP vs Structured Programming
What Is Good Software(Program)?
Presentation transcript:

240 3/30/98 CSE 143 Object-Oriented Design [Chapter 10]

241 3/30/98 Design Process  The traditional development model consists of three phases:  Analysis - defining the problem (what)  Design - the solution (high level)  Implementation - the solution (code)  Traditional development is sometimes called the waterfall model. Analysis DesignImplementation

242 3/30/98 Traditional Development  In this course, the problem is usually pretty well defined. We often suggest a design and ask you to provide an implementation.  Most of the time, development isn’t so easy…  Analysis or design may be poor  Goals may change during development  Implementation may be too hard or take too long  Testing?  Social, political, economic factors

243 3/30/98 Design Methodology  Changes may result in lots of wasted work! How to minimize their impact?  Use a good design methodology  Procedure and structure by which a design is created  Top-Down Design, aka structured design  Focus on overall control flow rather than data.  Think of problem in terms of functions and algorithms and how they need to interact  Often have a layered or hierarchical approach: make successively more detailed refinements to design

244 3/30/98 Top-Down Design  Advantages and disadvantages?  Usually gives very structured approach to problem First input is read, then processed, then results are printed, etc.  Adapts well to analysis, design, implementation phases  If right breakdown is chosen, everything works OK Each function does one thing and is separated from others  What happens if a bad decision was made? Not easy to fix without rewriting a lot of code  What happens if design needs to be changed?

245 3/30/98 Problems and alternatives  The traditional design model has shown itself to be insufficient for many real world tasks  cf. C-17, Air Traffic Control System  Alternatives:  Iterative software development models  rapid prototyping, exploratory programming (requires higher-level programming languages)  participatory design  object-oriented design  Need to involve the user early in the process.

246 3/30/98 Object-Oriented Design  Alternate design philosophy.  Instead of control flow, concentrate on entities (“objects”) in the problem (data-driven approach)  Object = Collection of data and operations on that data  All phases of design are in terms of objects  Lends consistency across phases without arbitrary breakdown between ideas and implementations  More relaxed, iterative, three-phase approach:  Can prototype a design or implementation and adapt it to changing needs relatively easily (true?)

247 3/30/98 OO Design (2)  What about changes?  Should be localized to a single object, or operations of objects, not spread out across lots of functions  What about bad decisions?  Hopefully, changes will be restricted to objects instead of functions  Ideally, objects are more reasonable way to think about problem than “flow control” is  Which approach is better?  Depends on the problem, the people, etc...

248 3/30/98 Designing in the OO Style  Identify the objects in the problem, and the operations they should have  What are the objects in the problem?  Determine organization of objects and operations  How do the objects relate to one another?  Are some contained inside another object, or need to organize other objects?  Drawing an object hierarchy diagram might help  Design a driver  Implement objects (C++ classes, or off-the-shelf)  Test and refine

249 3/30/98 What is an object?  Metaphor: robot, daemon  In C++  A class instance  A variable of a built-in type  Examples: ItemList I; int c; Bus b;// traffic simulation DieselBus d; ElectricBus e; DualModeBus f;

250 3/30/98 What is an operation?  Metaphor: a message which is sent to an object, requesting an action or service  Any action that manipulates data  Examples: i++; // built-in operation list.insertItem(...); // member function strcmp(a, b); // global function

251 3/30/98 Objects and operations  From the problem statement:  nouns may suggest objects  verbs (and often adjectives) may suggest operations  Determining which nouns and verbs are important is difficult  Examples of nouns from a bank simulation: bank, customer, account, accountNumber, balance, name, etc.  Example verbs: balance, deposit, withdraw, has, close  Adjectives: overdrawn

252 3/30/98 Object - Bank  Characteristics  name  list of customers  list of accounts  Operations  open an account  get the balance of an account  deposit money into an account

253 3/30/98 Object - Account  Characteristics  account number  type  balance  Operations  open  close  get balance  deposit

254 3/30/98 Organizing the objects  Relationships among the objects  has-a relationship (e.g. a customer has a name)  part-of relationship (e.g. an account number is part of the account)  Why do we need to determine the relationsips?  Leads to natural ways to implement the design  Suggest where to place the operations

255 3/30/98 Placing the operations  Who is responsible for this operation: Deposit an amount into an account.  Account (object)  Amount (object)  Deposit (operation)  Compare these calls: account.deposit(amount); amount.deposit(account); deposit(account, amount);  Which is better? If you can’t assign primary responsibility, the function is probably global.

256 3/30/98 The Driver  In a well designed program, the driver (main) is the easiest part to write.  The driver program should do little more than process user commands and delegate tasks to the objects.

257 3/30/98 Summary  Object-oriented design typically results in layered software.  ADTs play a vital role in these layers of abstraction.  OO design helps in problem decomposition and aids in reuse.  Still to consider:  inheritance  polymorphism