Download presentation
Presentation is loading. Please wait.
Published byHarold Cain Modified over 9 years ago
1
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
2
Design Process The Design Process Interaction Diagrams (sequence diagrams) Responsibilities Methods Design Class Diagrams Relationship between design class diagrams and interaction diagrams
3
Design Process Create/Modify Conceptual Class Diagram Create/Modify Design Class Diagram Create/Modify Interaction Diagrams Determine Responsibilities Determine Class Methods Use cases and Use Case specification
4
Interaction Diagrams We focus on Sequence Diagrams What objects are involved in carrying out an operation? What are the responsibilities of each object? Responsibilities will be “realized” or implemented as methods.
5
Methods A UML method is the implementation of an operation Illustrated In interaction diagrams, by the details and sequence of messages In class diagrams, with a UML note symbol stereotyped with >
6
Fig. 16.7 Showing Methods
7
Interaction to Design Class Diagrams Interaction diagrams generate a set of classes and their methods. Many of these classes originate from concepts in the domain class diagram
8
Fig. 16.7 Interaction diagrams and DCD—working together
9
Design Class Diagrams UML convention to illustrate classes, interfaces and their associations Static object modeling
10
Design Class Diagrams A class diagram that is used in a software or design perspective class methods are shown navigability is often shown (for attributes) software/design details are shown (sometimes even code)
11
Fig. 16.2 Domain Model v.s. Design Model
12
Attributes An attribute is a property of a class. The format for attributes is: visibility name: type multiplicity= defaultValue Visibility marks include + (public) – (private), etc. Attributes are usually assumed private if no visibility is given
13
Attributes Simple Attributes hold a value of a specific type such as an integer or a date. Reference Attributes hold a direct reference to another object or to a collection of objects.
14
UML Attributes Attributes of a class can be shown by Attribute text notation, such as currentSale:Sale OR Association line notation
15
Fig. 16.3 Showing attributes
16
Association line notation A navigability arrow pointing from the source (Register) to target (Sale) object, indicating a Register object has an attribute of one Sale The source (Register) references Sale but the Sale class does not have any knowledge of Register.
17
Association line notation Multiplicity at the target end, but not the source end A rolename (currentSale) only at the target end to show the reference attribute name No association name
18
Fig. 16.4 Domain v.s. Design
19
Attributes: Text vs Association What are data type objects? objects for which unique identity is not important e.g. date, postal codes, phone number, address, etc. Guideline Use attribute text notation for data type objects and association line notation for others
20
Fig. 16.5 Attributes: text notation v.s. association lines
21
Collection Attributes Array an attribute can be set to be treated as an array of attributes; shown with square braces [ ] beside the name.
22
Fig. 16.6 Collection Attributes
23
Attributes and Methods The methods listed in a class represent the functions that can be performed on the data in the class.
24
Accessing Methods When implementing the class, functionality is provided to set and retrieve the information stored in attributes. Methods to set and retrieve attribute data are called accessing methods Are often excluded from the class diagram as they are usually inferred
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.