Date post: | 22-Dec-2015 |
Category: |
Documents |
View: | 221 times |
Download: | 1 times |
© M.E. Fayad 2000-2005 SJSU -- CmpE L3-6b-S1 Sequence Diagrams
Software System Engineering
Dr. M.E. Fayad, Professor
Computer Engineering Department, Room #283I
College of Engineering
San José State University
One Washington Square
San José, CA 95192-0180
http://www.engr.sjsu.edu/~fayad
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S2 Sequence Diagrams
2
Lesson 3-6b:Sequence Diagrams
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S3 Sequence Diagrams
Lesson Objectives
Objectives
3
Understand how to generate sequence diagrams Learn the syntax of sequence diagram Explore examples of sequence diagrams
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S4 Sequence Diagrams
Place objects that participate in the interaction at the top of the diagram, across the X-axis
– Place the object that initiates the interaction at the left, and increasingly more subordinate objects to the right
Place messages the objects send and receive along the Y-axis, in order of increasing time from top to bottom 4
Drawing Sequence Diagrams
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S5 Sequence Diagrams
Use sequence diagrams to model flows of control by time ordering
– Do a better job of visualizing simple iteration and branching
Use collaboration diagrams to model flows of control by organization
– Do a better job of visualizing complex iteration and branching and of visualizing multiple concurrent flows of control 5
Common Uses
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S6 Sequence Diagrams
Sequence diagrams have two features:
– Object lifeline
• Vertical dashed line that represents the existence of
an object over a period of time
– Focus of control
• A tall, thin rectangle that shows the period of time
during which an object is performing an action,
either directly or through a subordinate procedure 6
Sequence Diagrams
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S7 Sequence Diagrams
7
Syntax of Sequence Diagram
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S8 Sequence Diagrams
8
Sequence Diagram: Example (1)
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S9 Sequence Diagrams
9
Sequence Diagram: Example (2)
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S10 Sequence Diagrams
10
Sequence Diagram: Example (3)
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S11 Sequence Diagrams
11
Sequence Diagram: Example (4)
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S12 Sequence Diagrams
12
Sequence Diagram: Example (5)
© M.E. Fayad 2000-2005 SJSU – CmpE --- M.E. Fayad L3-6b-S13 Sequence Diagrams
T/F:
1. The participants in the sequence diagrams are classes and components
2. The sequences in the sequence diagram are connected.
3. Sequence diagram is an event-trace diagram
4. You can generate a sequence diagram / use case.
5. A sequence diagram models flows of control by time ordering 13
Discussion Questions