Professional Documents
Culture Documents
WITH UML
ANALYSIS
Use Case Realization
Use Case
Use-Case Model
Engineer Analysis Class
Analyse a
Use Case
Supplementary
Requirements
Use Case
Realisation
Spring-910
1
MIS326 What are use case realisations?
1 «trace» 1
use case Place Order Place Order use case
realisation
dependency
Spring-910
2
MIS326 Two Types of Interaction Diagrams
There are two types:
Sequence diagrams
These are best for showing a time-ordered sequence of message sends
between objects
Collaboration diagrams
These are most useful for showing the structural relationships between
objects
Collaboration diagrams and sequence diagrams are isomorphic.
They are each a view onto the same underlying dynamic model and present
the same information but in different ways
Collaboration Diagrams
Sequence Diagrams
Spring-910
Interaction diagrams
MIS326
Spring-910
3
What Is a Sequence Diagram?
MIS326
Sequence Diagrams
MIS326
Spring-910
4
Sequence diagrams
MIS326
:RegistrationManager
Registrar
focus of control
The Registrar addCourse( “UML” )
adds a UML object creation
course. «create»
UML:Course {new}
The Registrar addCourse( “MOOP”)
adds a MOOP
course.
«create»
MOOP:Course {new}
The Registrar removeCourse( “UML” )
removes the
UML course.
«destroy»
message
object
destruction
message flow
comments object lifeline
Spring-910
:Client :Supplier
Object Lifeline
Reflexive Message
1: PerformResponsibility
This is a sample
script.
1.1: PerformAnother
Responsibility
Message
Hierarchical Message
Numbering
Focus of Control
Spring-910
5
Describe Responsibilities
MIS326
:Client :Supplier
PerformResponsibility
Class Diagram
Supplier
PerformResponsibility
Spring-910
Finding Relationships
MIS326
1: PerformResponsibility
Class
Diagram Client 0..* 0..* Supplier
Prime suppliers
PerformResponsibility()
Association
6
MIS326 Branching and iteration
branch of control
return
merge of control
Spring-910
MIS326
Spring-910
7
MIS326
Spring-910
Collaboration Diagrams
8
Objects, links and messages
MIS326
object
message UML:Course {new}
sequence
constraint
number
2: addCourse( “MOOP”)
:RegistrationManager
message flow
Registrar link
2.1: «create»
object creation
MOOP:Course {new} message
Spring-910
Multiobjects
MIS326
1: printStudent ( “Jim” )
:RegistrationManager
Registrar
1.2:print() 1.1.1: aStudent = find( “Jim” )
Multiobjects represent a
students
set of objects aStudent «local»
Course
Messages sent to a :Student Course
:Student
multiobject go to the
set, not to any individual multiobject
object
Spring-910
9
Iteration
MIS326
iteration
iteration specifier expression
1: printCourses( )
:RegistrationManager
i
Registrar
qualifier
Iteration is shown by prefixing 1.2: print()
the sequence number with the
iteration specifier *, and an
Course
optional iteration expression in Course
:Course
square brackets multiobject
There is no formal UML syntax
for iteration expressions
Spring-910
Branching
MIS326
Branching is modelled by
prefixing the sequence
number with a condition.
Course
Course
This is an expression in UML:Course :Student
square brackets
There is no formal UML
syntax for conditions It’s hard to show branching clearly!!
Spring-910
10
MIS326
Spring-910
MIS326
Spring-910
11
MIS326
Spring-910
AF3
AF1
AF2
Alternate Flow 4 Alternate Flow 5 Alternate Flow n
Spring-910
12
Collaboration Diagrams Vs Sequence
MIS326 Diagrams
Spring-910
Summary
MIS326
Spring-910
13