Object-Oriented Systems Analysis and Design Using UML
Object-Oriented Systems Analysis and Design Using UML
Tenth Edition
Chapter 10
Object-Oriented
Systems Analysis
and Design Using
UML
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Learning Objectives (1 of 2)
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Learning Objectives (2 of 2)
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Class Diagrams
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Class Diagrams (continued)
•Classes
•Attributes
–Private
–Public
–Protected
•Methods
–Standard
–Custom
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.13 A Class Diagram for Course Offerings: The
Filled-In Diamonds Show Aggregation and the Empty
Diamond Shows a Whole-Part Relationship
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Method Overloading
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Types of Classes
•Entity classes
•Interface classes
•Abstract classes
•Control classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Entity Classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Interface or Boundary Classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Abstract Classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Control Classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Presentation, Business, and
Persistence Layers
•Sequence diagrams may be discussed using
three layers:
–Presentation layer, what the user sees, corresponding
to the interface or boundary classes
–Business layer, containing the unique rules for this
application, corresponding roughly to control classes
–Persistence or data access layer, for obtaining and
storing data, corresponding to the entity classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Defining Messages and Methods
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.15 A Sequence Diagram for Using Two Web
Pages: One for Student Information, One for Course
Information
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Create Sequence Diagrams
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Relationships
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.18 An Example of an Associative Class in Which
a Particular Section Defines the Relationship between a
Student and a Course
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Associations
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Whole/Part Relationships
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Aggregation
•A “has a” relationship
•Provides a means of showing that the whole
object is composed of the sum of its parts
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Collection
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Composition
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.19 An Example of Whole-Part
and Aggregation Relationships
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Generalization/Specialization
Diagrams
•Generalization
•Inheritance
•Polymorphism
•Abstract classes
•Messages
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Generalization
• Describes a relationship between a general kind of thing
and a more specific kind of thing
• Described as an “is a” relationship
• Used for modeling class inheritance and specialization
• General class is a parent, base, or superclass
• Specialized class is a child, derived, or subclass
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Inheritance
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Polymorphism
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Abstract Classes
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.20 A Generalization/Specification Diagram
Is a Refined Form of a
Class Diagram
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Finding Classes
•During interviewing
•During facilitated team sessions
•During brainstorming sessions
•Analyzing documents and memos
•Examining use cases, looking for nouns
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Determining Class Methods
•Standard methods
•Examine a CRUD matrix
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Messages
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Statechart Diagrams
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Statechart Diagrams (continued)
•Created when:
–A class has a complex life cycle
–An instance of a class may update its attributes in a
number of ways through the life cycle
–A class has an operational life cycle
–Two classes depend on each other
–The object’s current behavior depends on what
happened previously
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.22 A Statechart Diagram Showing How a
Student Progresses from a Potential Student to a
Graduated Student
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Packages
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.23 Use Cases Can Be
Grouped into Packages
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Putting UML to Work
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Summary
•Object-oriented systems
–Objects
–Classes
–Inheritance
•CRC cards
•UML and use case modeling
•Components of UML
–Things
–Relationships
–Diagrams
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Summary (continued)
•UML diagrams
–Use case diagrams
–Activity diagrams
–Sequence diagrams
–Communication diagrams
–Class diagrams
–Statechart diagrams
•Using UML
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Copyright
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved