Sequence Diagrams Flashcards
(20 cards)
What is a sequence diagram?
A picture showing how objects interact over time, with messages in order.
What are the two axes in a sequence diagram?
Horizontal: objects (lifelines). Vertical: time (top to bottom).
What is a lifeline?
A dashed line showing an object’s existence during the interaction.
How are objects shown in sequence diagrams?
As rectangles at the top of lifelines (e.g., ‘user:Customer’).
What is a synchronous message?
A call where the sender waits for a reply (solid arrow).
What is an asynchronous message?
A call where the sender doesn’t wait (open arrow).
What shows object creation?
A dashed arrow with the keyword ‘new’.
How is object destruction shown?
A big X at the end of the lifeline.
What is a ‘found message’?
A message from an unknown sender (arrow from edge).
What is a ‘lost message’?
A message with no receiver (arrow to edge).
What does ‘alt’ fragment do?
Shows alternatives (like ‘if/else’). Guards decide the path.
What does ‘opt’ fragment do?
Shows an optional step (like ‘if’ without ‘else’).
What does ‘loop’ fragment do?
Repeats steps (e.g., ‘loop(1,5)’ = 1 to 5 times).
What is a ‘break’ fragment?
Exits early if a condition is met (like ‘break’ in loops).
What does ‘par’ fragment mean?
Parallel actions (order doesn’t matter).
What does ‘strict’ fragment mean?
Steps must happen in exact order (no mixing).
What is a guard?
A condition in [brackets] that decides if a step runs (e.g., ‘[valid]’).
How do you show time-consuming messages?
A slanted arrow (takes time to deliver).
What is a ‘seq’ fragment?
Default order: same-object steps stay ordered; others can mix.
What are interaction partners?
Objects or roles that send/receive messages (e.g., ‘User’, ‘Server’).