Design Model: Creating Design Class Diagrams

Slides:



Advertisements
Similar presentations
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Advertisements

Object Design Examples with GRASP
Jan 23, Ron McFadyen1 SSD for a samplePOS Use Case Figure 13.1 Input Events invoke a system operation of the same name same idea as in object-oriented.
Oct Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Oct 22, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
March Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns Assigning responsibilities to objects to achieve user goals Section 17.4.
Fall 2009AXS-3913 Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Oct Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns P. 248: “The assignment of responsibilities and design of collaborations.
Fall 2009ACS-3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
October 16, 2001Class Diagrams1. October 16, 2001Class Diagrams2 (Design) Class Diagrams (1) zA class diagram is a visual representation of various classes.
Feb 4, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – (interfaces,
Feb Ron McFadyen1 Use Case Realizations with GRASP Patterns “The assignment of responsibilities and design of collaborations are very important.
November Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
Object-Oriented Analysis and Design
November Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Fall 2009ACS-3913 Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Date: 1753 an interpretation.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
9/18/011 Software Requirements Analysis and Design (Continued)
Object-Oriented Analysis and Design
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Object-Oriented Design. From Analysis to Design Analysis Artifacts –Essential use cases What are the problem domain processes? –Conceptual Model What.
Chapter 2.1 Iterative, Evolutionary, and Agile. Introduction We will look at Agile Modeling, UML, and iterative and evolutionary development. We will.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
GRASP Pattern Zhen Jiang West Chester University
Chapter 18 Object Design Examples with GRASP. Objectives Design use case realizations –A use-case realization describes how a particular use case is realized.
1 Ch 18. Object Design Examples With Grasp Objectives Design use case realizations. Apply GRASP to assign responsibilities to classes. Apply UML to illustrate.
1 Unified Modelling Language OOA/OOD a summary of the book: Applying UML and Patterns, Craig Larman D. Dranidis October 2000 CITY College.
Object Oriented Analysis and Design System Events & Contracts.
Object Design Examples with GRASP (Ch. 18)
Review ♦ System sequence diagram ♦ Domain model
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
Operation Contracts: Getting ready to open the “System” black box All material from Applying UML and Patterns, 3 rd Edition, Craig Larman, chapter 11.
Design Class Diagrams (DCDs)
Chapter 16 Applying UML and Patterns Craig Larman
Chapter 9 Applying UML and Patterns -Craig Larman
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Fall 2009ACS-3913 Ron McFadyen1 Use Case Realizations with GRASP Patterns “The assignment of responsibilities and design of collaborations are very important.
Chapter 2.2 Iterative, Evolutionary, and Agile A Continuation.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
GRASP: Designing Objects With Responsibilities
OO Methodology Elaboration Phase Iteration 1- Part 3.
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
Use-Case Model: Adding Detail with Operation Contracts.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
Oct 3, Ron McFadyen1 GRASP Patterns 1.Expert 2.Creator 3.Controller 4.Low Coupling 5.High Cohesion.
1 Object Oriented Analysis and Design System Events & Contracts.
Design Model: Determining Visibility CH-18. Objectives Identify four kinds of visibility. Design to establish visibility. Illustrate kinds of visibility.
1 Chapter 13: Class Diagram Chapter 19 in Applying UML and Patterns Book.
OO Methodology Elaboration Phase Iteration 1- Part 2.
Ch 17: Use Case Realizations with GRASP Patterns
Object Design Examples with GRASP
TK2023 Object-Oriented Software Engineering
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Chapter 16 UML Class Diagrams.
GRASP: Visibility and Design
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
OO Domain Modeling With UML Class Diagrams and CRC Cards
Chapter 11: Class Diagram
Object Oriented Analysis and Design Conceptual Model.
Chapter 16 UML Class Diagrams
Implementation Model: Mapping Designs to Code
Operation Contracts Ch. 11.
Domain Model: Visualizing Concepts
Chapter 11: Class Diagram
Presentation transcript:

Design Model: Creating Design Class Diagrams

When to create DCDs Once the interaction diagrams have been completed it is possible to identify the specification for the software classes and interfaces. A class diagram differs from a Domain Model by showing software entities rather than real-world concepts. The UML has notation to define design details in static structure, or class diagrams.

DCD and UP Terminology Typical information in a DCD includes: Classes, associations and attributes Interfaces (with operations and constants) Methods Attribute type information Navigability Dependencies The DCD depends upon the Domain Model and interaction diagrams. The UP defines a Design Model which includes interaction and class diagrams.

Domain Model vs. Design Model Classes Register Sale Domain Model 1 Captures 1 Date isComplete : Boolean time Register Sale Date isComplete : Boolean time Design Model 1 Captures 1 addLineItem(…) … makeLineItem()

An Example DCD Three section box Navigability Sale Register Date isComplete : Boolean time 1 1 Captures addLineItem(…) … makeLineItem() methods; parameters not specified Type information

Creating a NextGen POS DCD Identify all the classes participating in the software solution. Do this by analyzing the interaction diagrams. Draw them in a class diagram. Duplicate the attributes from the associated concepts in the Domain Model. Register ProductSpecification description price itemID ProductCatalog Payment quantity amount Sale Store SalesLineItem address name date isComplete time quantity

Creating a NextGen POS DCD Add method names by analyzing the interaction diagrams. The methods for each class can be identified by analyzing the interaction diagrams. Sale If the message makeLineItem is sent to an instance of class Sale, then class Sale must define a makeLineItem method. date isComplete time makeLineItem() 3: makeLineItem(spec, quantity) :Register :Sale

Creating a NextGen POS DCD Add type information to the attributes and methods. Register ProductCatalog ProductSpecification Payment description price itemID amount … getSpecification() endSale() addLineItem() makeNewSale() makePayment() Sale SalesLineItem date isComplete: Boolean time Quantity: Integer Store becomeComplete() makeLineItem() makePayment() getTotal() Address: String Name: String getSubtotal() addSale()

Method Names -Multiobjects The find message to the multiobject should be interpreted as a message to the container/ collection object. The find method is not part of he ProductSpecification class. 1: spec := getSpecification(id) :ProductCatalog 1.1: spec := find(id) :ProductSpecification

Associations, Navigability, and Dependency Relationships Add the associations necessary to support the required attribute visibility. Each end of an association is called a role. Navigability is a property of the role implying visibility of the source to target class. Attribute visibility is implied. Add navigability arrows to the associations to indicate the direction of attribute visibility where applicable. Common situations suggesting a need to define an association with navigability from A to B: A sends a message to B. A creates an instance of B. A needs to maintain a connection to B Add dependency relationship lines to indicate non-attribute visibility.

Creating a NextGen POS DCD Register class will probably have an attribute pointing to a Sale object. Navigability arrow indicates Register objects are connected uni-directionally to Sale objects. Sale Register Date isComplete : Boolean time Captures 1 1 endSale() addLineItem() makePayment() makeLineItem() Absence of navigability arrow indicates no connection from Sale to Register.

Adding Navigability and Dependency Relationships Uses Store 1 ProductSpecification address : Address name : Text 1 1 description : Text price : Money itemID: itemID ProductCatalog addSale() Contains 1 1 1 Looks-in getSpecification() 1 Houses Illustrates non-attribute visibility Describes 1 1 * Register SaleLineItem Sale Captures Contains Date : Date isComplete : Boolean time : Time quantity : Integer 1 1 endSale() enterItem() makePayment() 1 getSubtotal() becomeComplete() makeLineItem() makePayment() getTotal() Payment amount : Money * 1 Logs-completed Paid-by 1

Sources Visual Paradigm Class Diagrams: https://www.visual- paradigm.com/guide/uml-unified-modeling-language/what-is-class- diagram/ Good explanation on visibility: https://tonnygaric.com/blog/visibility- between-objects-in-a-uml-class-diagram