Download - OOSE Week 07-UML Sequence Diagram
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
1/20
Modeling Diagrams
Basic concepts and symbols of UML notations
(Sequence Diagram)
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
2/20
Sequence Diagram
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
3/20
Sequence Diagram
■ Sequence diagram: an "interaction diagram"that models a single scenario executing in thesystem
■ perhaps 2nd most used UML diagram (behind class
diagram)
The sequence diagram consists of objects
represented in the usual ay (as named
rectangles ith the name underlined)!messages represented as solid"line arros! and
time represented as a #ertical progression
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
4/20
$omponents
Objects: aStudent is a specific
instance of the Student class
Specific
Instance of anObject
Generic (unnamed)
objects
Generic (unnamed)
objects of class type Seminar and Course
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
5/20
%bjects
& The objects are laid out near the top of the diagram from
left to right''
& tending donard from each object is a dashed linecalled the object*s lifeline'
&+long the lifeline is a narro rectangle called anacti#ation' The acti#ation represents an eecution of
an operation the object carries out' The length of
the rectangle signifies the acti#ation*s duration'
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
6/20
$omponents
Return value
ethod call
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
7/20
$omponents
lifeline
e!ecution
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
8/20
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
9/20
Synchronous Message
%ne type of message is a call' This is a request
from the object sending the message to the object
recei#ing the message' The request is for the
recei#er to carry out one of its (the recei#er*s)operations' Because the sender aits for the recei#er
(that is! .synchs up. ith the recei#er)! this message
is also referred to as synchronous'
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
10/20
+synchronous Message
& /ith this one! the sender transfers control to the
recei#er and doesn*t ait for the operation to
complete
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
11/20
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
12/20
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
13/20
ample
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
14/20
+nother ample
Model of a Soda Machine
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
15/20
+ sequence diagram that models the best
case scenario of Buy" Soda use case
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
16/20
+ sequence diagram that models the
sold"out scenario of Buy" Soda use case
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
17/20
+ sequence diagram that models the incorrect"
change scenario of Buy" Soda use case
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
18/20
+ generic sequence diagram of Buy" Soda
use case
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
19/20
Case Study: Answering System:
%ne of the purpose of sequence diagram is to document use cases' /e ill dra
sequence diagrams for some of the use cases for +nsering Machine domain'
Sequence Diagram for use case Answer Caller:
This use case begins ith a caller ringing the ansering machine and completes
after the call has been completed' This use case is meant to be etended by mode
specific processing'
Let*s identify the acti#ities in#ol#e to perform its responsibilities' The acti#ities are0
The caller rings the phone line connected to the ansering machine'&The +nsering Machine aits for the ring count to reach the ansering ring count'
&The +nsering Machine plays greeting'
&The +nsering Machine performs any mode specific processing'
&1f caller hangs up during the playing of the greeting! the system recogni2es the
hang"up! stops the greeting and prepare for the net caller'
-
8/15/2019 OOSE Week 07-UML Sequence Diagram
20/20