OOD - Principles Design Class Diagrams

Slides:



Advertisements
Similar presentations
Chapter 11 Component-Level Design
Advertisements

OOD - Principles Design Class Diagrams Chapter 10 pp ; ;
Systems Analysis and Design in a Changing World, Fourth Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Robustness Analysis Dr. Neal CIS 480. Outline What is robustness analysis? Key roles in robustness analysis Object types found in discovery Diagramming.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
Software Engineering Principles and C++ Classes
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Object-Oriented Analysis and Design
Object-Oriented Analysis and Design
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
Object-Oriented Design. From Analysis to Design Analysis Artifacts –Essential use cases What are the problem domain processes? –Conceptual Model What.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
The Design Discipline.
SA Capstone Requirements and Design Week 6 SYST Winter 2014
The Object Oriented Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Systems Analysis and Design in a Changing World, Fifth Edition
INFO415 Approaches to System Development: Part 2
Agenda Schedule Assignment 2 Due Next week [Nov 25 th ] Quiz No 04 – SSDs & Sequence Diagrams Today Review last week Review ICE-08 from last week Sequence.
Chapter 5 - Writing a Problem Domain Class Definition1 Chapter 5 Writing a Problem Domain Class Definition.
1 SA Capstone Requirements and Design Week 6 SYST Winter 2015 Some slides adapted from: Systems Analysis and Design in a Changing World, 6th Edition,
Systems Analysis and Design in a Changing World, 6th Edition
Systems Analysis and Design in a Changing World, 6th Edition
Two Approaches to System Development
Systems Analysis and Design in a Changing World, 6th Edition
12 Systems Analysis and Design in a Changing World, Fifth Edition.
1 ITEC 3010 “Systems Analysis and Design, I” LECTURE 10: Use Case Realizations [Prof. Peter Khaiter]
Systems Analysis and Design in a Changing World, 6th Edition 1 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH Chapter 11 SATZINGER.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Chapter 17. Initial Object Design Inputs: requirements meetings various Use Cases – 10% complete Key risks addressed with preliminary programming System.
Object Oriented Design Jerry KotubaSYST Object Oriented Methodologies1.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Chapter 1 Object Orientation: Objects and Classes.
Systems Analysis and Design in a Changing World, 3rd Edition
Data Structures Using C++1 Chapter 1 -Software Engineering Principles -ADT and Classes.
2 Object-Oriented Analysis and Design and the Unified Process Objectives  Explain the purpose and objectives of object- oriented design  Develop design.
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
1 ITEC 2010 Chapter 9 – Design The Structure Chart Structure chart –A hierarchical diagram showing the relationships between the modules of a.
A Student Guide to Object- Oriented Development Chapter 10 Designing objects and classes.
Use Case Controller System sequence diagram (SSD) shows input messages from external actors within use case Only indicates that messages go to system Use.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
Class Diagram Chapter 21 Applying UML and Patterns Craig Larman.
Chapter 16 UML Class Diagrams.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
11. Chapter 11: The Object-Oriented Approach to Design: Use Case Realization Systems Analysis and Design in a Changing World, Fourth Edition.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Agenda 0 Today 0 Assignment 2 Due 0 Sequence Diagrams- View & Data Layers 0 Message syntax 0 Cohesion & Coupling 0 Next Week 0 Review and wrap-up 0 Structure.
Modeling with UML – Class Diagrams
UNIT-IV Designing Classes – Access Layer ‐ Object Storage ‐ Object Interoperability.
Systems Analysis and Design in a Changing World, 6th Edition
Chapter 16 UML Class Diagrams.
Conception OBJET GRASP Patterns
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
The Object Oriented Approach to Design
OOD - Principles Design Class Diagrams
Systems Analysis and Design in a Changing World, 6th Edition
Analysis models and design models
Defining Classes and Methods
Fundaments of Game Design
GoF Patterns Ch. 26.
Presentation transcript:

OOD - Principles Design Class Diagrams Chapter 12

Outline Design Class Design Class Diagram Elabrorate Attrbutes Elaborate Methods Design Class Diagram Add a Controller Class Add Navigation Visibility

OOD: Object-Oriented Design Specify objects to carry out each use case Use Case Name: "Update Student"

Analysis to Design to Implementation: Model Flow Ch 4 Ch 12 Ch 3 Ch 13 Ch 5

From Requirements (Analysis) to Design… Ch10 Ch11

Defining a Single Design Class

Domain Class vs. Design Class

Design Class: Things to Know Elaborate attributes Define Method types Write Method Signatures Understand the difference between Attributes & Methods Instance Level Class Level

Elaborating Attributes visibility attributeName: dataType {property} Visibility Public or Private Data type Numbers: integer, double Text: string True/False: boolean Dates: dateTime Property key

Method Types 3 Method types Constructor methods Accessor methods Get Set Processing methods

visibility methodName(parameterList) : returnType Method Signatures visibility methodName(parameterList) : returnType Visibility Public or Private Method name Verb phrase Parameter List Inputs Return Type Output Typical data type: integer, string, etc Object (e.g. Student) Collection of objects: StudentArray

Instance-Level vs. Class-Level Attributes & Methods Pertains to an individual object/instance Attribute  name Method  getName(), calcGPA() Class-Level Does not pertain to an individual object/instance Attribute  tuitionPerHour Method  findAboveHours() -tuitionPerHour: integer

Exercise Design a Design Class for: Vehicle Attributes Method Primary Key Instance attribute Class Attribute Method Constructor method Instance Method Accessor methods (2) Processing method Class Method

A Design Class (coded in VB)

Design Class Diagram Overridden Method How many attributes are there in a MailOrder object?

Designing a Design Class Diagram

Review – let’s understand this Use Case before continuing Use Case Description “Process New Order”

Review – let’s understand this model before continuing Domain Class Diagram

Steps: Initial Design Class Diagram Select a Use Case: “Process New Order” Add Domain Classes See pre-conditions & post-conditions for ideas Elaborate Attributes: visibility, data types

Steps: Initial Design Class Diagram Add a "Controller" class Switchboard between the View & Domain Layer; a collection point for incoming messages. Include one per use case.

Steps: Initial Design Class Diagram Add Navigation Visibility (def) the ability of one object to interact with another 1 to Many Association 1  * Mandatory Associations IndepDependent Needs info Sender Receiver Rules

Steps: Initial Design Class Diagram Add Methods (we will see this in Ch 13 - Sequence Diagrams) That is, Behavior!

Fundamental Design Principles Object Responsibility Separation of Responsibilities Protection from Variations Indirection Coupling - low Cohesion - high

Fundamental Design Principles Object Responsibility A design principle that states objects are responsible for carrying out system processing Responsibilities include: “Knowing” Objects know about their attribute values. Objects know about other objects (associations) “Doing” Objects know how to carry out methods, do what they are asked to do.

Fundamental Design Principles Separation of Responsibilities i.e. Separation of Concerns Segregate classes into groups based on primary focus of the classes Basis for multi-layer design – view, domain, data access

Fundamental Design Principles Protection from Variations A design principle that states parts of a system unlikely to change are separated (protected) from those that will surely change Example: Separate UI forms that are likely to change from application logic Put DB connection and SQL statements that are likely to change in a separate classes from application logic

Fundamental Design Principles Indirection A design principle that states an intermediate class is placed between two classes to decouple them but still link them Example: Add a controller class between UI classes and problem domain classes

Fundamental Design Principles Coupling A quantitative measure of how closely related classes are linked (tightly or loosely coupled) Goal: Low Coupling Two classes are tightly coupled if: there are lots of associations with another class there are lots of messages to another class Example: A Customer object can access a Sale object  this coupling is necessary A Customer object can access a SaleItem object  this coupling is unnecessary because only a Sale object should access a SaleItem

Fundamental Design Principles Cohesion A quantitative measure of the focus or unity of purpose within a single class (high or low cohesiveness) Goal: High Cohesion A class has high cohesiveness if: all of its responsibilities are consistent and make sense for purpose of the class Example: A customer objects carries out responsibilities that naturally apply to customers A class has low cohesiveness if: its responsibilities are broad