UML Lecture Fall09
UML Lecture Fall09
Booch ‘91
OMT - 1
began in late 1994(unifying the Booch and OMT
(Object Modeling Technique) methods )
UML Diagrams
Each UML diagram is designed to let developers
and customers view a software system from a
different perspective and in varying degrees of
abstraction
Use Case Diagram
Class Diagram
Interaction Diagrams (Sequence Diagram / Collaboration
Diagram )
State Diagram
Activity Diagram
…
Source:
http://en.wikipedia.org/wiki/Unified_Modeling_Language
Use-Case Diagrams
Relationship between actors and use cases;
capturing user requirements.
Actors: An actor is represents a user or another
system that will interact with the system you are
modeling
Use cases: an external view of the system that
represents some actions the user might perform in
order to complete a task
Use-Case Diagrams
When to use:
Use cases are used in almost every project.
How to Draw
Simplest
Use-Case Diagrams: Example
Regular Loyalty
Customer Customer
Subtype1 Subtype2
-Inheritance is a required feature of object orientation
-Generalization expresses a parent/child relationship among related classes.
0..1 *
employer teacher
Multiplicity Role
Symbol Meaning
1 One and only one
Role
0..1 Zero or one “A given university groups many people;
some act as students, others as teachers.
M..N From M to N (natural language)
A given student belongs to a single
* From zero to any positive integer university; a given teacher may or may not
0..* From zero to any positive integer be working for the university at a particular
1..* From one to any positive integer time.”
Association: Composition and Aggregation
Aggregations
may form "part of" the association, but may not be
essential to it. They may also exist independent of the
aggregate. e.g. Employees may exist independent of the
team.
Association: Composition and Aggregation
Composition : (filled diamond)
Aggregation : (hollow diamond).
Interaction Diagrams
Interaction diagrams are used when you want to model the
behavior of several objects in a use case
Collaboration diagrams
Collaboration diagrams demonstrate how objects are statically connected.
Sequence Diagram:Object interaction
A B
Self-Call:
Self-Call A message that an
Object sends to itself. Synchronous
[condition] remove()
Condition
*[for each] remove()
Iteration
Self-Call
Sequence Diagram(make a phone
call)
Picks up
Dial tone
Dial
Picks up
Hello
Sequence Diagrams – Object Life Spans
Creation
A
Create message
is activated.
Rectangle also denotes when
object is deactivated.
Deletion Activation bar
X
Return
Placing an ‘X’ on lifeline Deletion
Object’s life ends at that point Lifeline
Sequence Diagrams – Object Life Spans
Interaction Diagrams: Collaboration diagrams
start
6: remove reservation
5: title available
6 : borrow title
1: look up
2: title data
4 : title returned
Catalog
5 : hold title
Collaboration diagrams are equivalent to sequence diagrams. All the features of sequence
diagrams are equally applicable to collaboration diagrams
Use a sequence diagram when the transfer of information is the focus of attention
Yellow
Green
Event
Activity Diagrams
Activity diagrams describe the
workflow behavior of a system.
similar to state diagrams because
activities are the state of doing something