Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Oriented Analysis & Design

Similar presentations


Presentation on theme: "Object-Oriented Analysis & Design"— Presentation transcript:

1 Object-Oriented Analysis & Design
Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José State University One Washington Square San José, CA 2003 SJSU -- CmpE

2 Lesson 21: Sequence Diagrams
2003 SJSU – CmpE --- M.E. Fayad

3 3 Lesson Objectives Understand how to generate sequence diagrams
Learn the syntax of sequence diagram Explore examples of sequence diagrams 3 2003 SJSU – CmpE --- M.E. Fayad

4 Drawing 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 2003 SJSU – CmpE --- M.E. Fayad

5 Common Uses 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 2003 SJSU – CmpE --- M.E. Fayad

6 6 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 2003 SJSU – CmpE --- M.E. Fayad

7 Syntax of Sequence Diagram
7 2003 SJSU – CmpE --- M.E. Fayad

8 Sequence Diagram: Example (1)
8 2003 SJSU – CmpE --- M.E. Fayad

9 Sequence Diagram: Example (2)
9 2003 SJSU – CmpE --- M.E. Fayad

10 Sequence Diagram: Example (3)
10 2003 SJSU – CmpE --- M.E. Fayad

11 Sequence Diagram: Example (4)
11 2003 SJSU – CmpE --- M.E. Fayad

12 Sequence Diagram: Example (5)
12 2003 SJSU – CmpE --- M.E. Fayad

13 13 Discussion Questions T/F:
The participants in the sequence diagrams are classes and components The sequences in the sequence diagram are connected. Sequence diagram is an event-trace diagram You can generate a sequence diagram / use case. A sequence diagram models flows of control by time ordering 13 2003 SJSU – CmpE --- M.E. Fayad


Download ppt "Object-Oriented Analysis & Design"

Similar presentations


Ads by Google