Lecture 05 Design With Sequence
Lecture 05 Design With Sequence
Sequence Diagram(make a
phone call)
Picks up
Dial tone
Dial
Picks up
Hello
1. Person kicks the cat
2. Cat reports to inspector
3. Inspector reports to Policeman
4. Policeman arrests person
Slide 3
Slide 4
Slide 5
Sequence Diagrams
• Dynamic model
• Illustrate the objects that participate in a use-case
• Show the sequence of messages that pass between objects
for a particular use-case over time
• Example: order food, change tv channel
• It models a single scenario executing in the system
Slide 6
Sequence Diagrams – Object Life Spans
• Creation
A
⮚ Create message
⮚ Object life starts at that point
• Activation Create
B
⮚ Symbolized by rectangular stripes
⮚ Place on the lifeline where object is
activated.
⮚ Rectangle also denotes when object
is deactivated.
• Deletion X
Activation bar Return
⮚ Placing an ‘X’ on lifeline
Deletion
⮚ Object’s life ends at that point
Lifeline
Sequence Diagram
Slide 10
Sequence Diagram for Print Invoice
use case
Example: Use Case Diagram of the
Vending Machine
Sequence Diagram
for Deposit Money Use Case
System Sequence Diagram
for Make Selection Use Case
System Sequence Diagram
for Cancellation Use Case
System Sequence Diagram
for Update Database Use Case
Building a Sequence Diagram
Slide 17
Alternate / if-else scenario in sequence
diagram
Upper or lower
part will work
at a time.
Based on the
condition.
Sequence Diagram for search book
Use Case
Multiple If-else condition
Slide 21
Thanks
* 22