The Object-Oriented Approach To Design: Use Case Realization
The Object-Oriented Approach To Design: Use Case Realization
Chapter 11:
The Object-Oriented Approach to
Design: Use Case Realization
Started with
domain class
diagram
Added as we evolve to
design class diagrams
11
Start the Transition from Domain to Design
Class Diagrams
Exists on System
Automation Boundary
Remember, we have
one SSD for each use
case!
It all started with events
from our event table
Same message
that was
originally sent
to :System
11
First-Cut Sequence Diagram for the Look
Up Item Availability Use Case
Activation Lifelines
11
Class diagram
updated with
method signatures,
one for each
message
Better use
pseudocode to
document how to
code each method
too!
11
What did you learn?
To develop a first-cut sequence diagram, you
should follow three steps. List the three
steps.
11
Guidelines for Preliminary Sequence
Diagram Development
Take each input message and determine internal messages
that result from that input
For that message, determine its objective
Needed information, class destination, class source, and
objects created as a result
Identify complete set of classes affected by each input
message
Select objects from domain class diagram
Flesh out components for each message
11
Question?
Create an interaction diagram from an SSD
Develop a first-cut sequence diagram, which only
includes the actor and the problem domain
classes.
What updates would you make to transform the
domain class diagram into a design class
diagram?
SSD for the “Record Dental Procedure” 11
use case
: :Patient :Household :MedProdVisit :MedStaff
RecordDen
talProcedur
eHandler
patentID:=getID()
Address:=getAddress()
updateVerificationMessage:=
recordProcedure (staffID,description)
38
11
Question?
Create an interaction diagram from an activity
diagram (next)
Develop a first-cut sequence diagram, which only
includes the actor and the problem domain
classes.
What updates would you make to transform the
domain class diagram into a design class
diagram?
Activity Diagram & Domain Class Diagram for 11
the use case “Enter new patient information”
40
11
Developing a Multilayer Design for
Look up item availability
First-cut sequence diagram – classes in domain layer +
use case controller
Add design for user-interface classes – view layer
Forms added as windows classes to sequence
diagram
Add design for data access classes – data access layer
with separate classes for database
11
Look Up Item Availability Use Case with
View Layer and User-Interface Object
Add new user
interface class
11
Partial Three-Layer Design for
Objects from Data
Look Up Item Availability Access Classes
aC:Cataog and
aP:ProductItem
are specific
instances of
objects
11
SSD for the Telephone Order Scenario of
the Create New Order Use Case
Start at the top,
work your way to
the bottom,
adding objects,
messages, and
methods as you
go.
These can get
large and
complicated!
11
Partial Sequence Diagram for the
Telephone Order Scenario
11
Another Partial Sequence Diagram
for the Telephone Order Scenario
11
Sequence Diagram for Telephone Order
Scenario of Create New Order Use Case
11
Developing a Multilayer Design for
the Telephone Order Scenario
To reduce complexity of diagrams, extend use case
scenario one message at a time
Add user interface view layer to scenario
Add single data access class
Add each message to extend design
Sequence diagrams can become complicated!
Completed design provides foundation for programming the
use case
11
Telephone Order Sequence Diagram for
the startOrder Message
11
Telephone Order Sequence Diagram for
the addItem Message
11
Telephone Order Sequence Diagram for
the final messages
11
Updating the Design Class Diagram
Design class diagrams developed for each layer
New classes for domain layer use case controllers
New classes for view layer and data access layer
Sequence diagram’s messages used to add methods
Constructor methods
Data get and set method
Use case specific methods
11
Create New Order
4 Methods Supported
by Order
11
Updated Design Class Diagram
for the Domain Layer
11
Package Diagrams – Structuring
the Major Components
High-level diagram in UML to associate classes of related
groups
Identifies major components of a system and
dependencies
Determines final program partitions for each layer
View, domain, data access
Can divide system into subsystem and show nesting
within packages
11
Partial Design of a Three-Layer Package
Diagram for RMO Dependency Relationship:
(dashed arrows)
NewItemWindows is
dependent on OrderItem