Software Engineering - Old Questions

9. Discuss sequence diagram with suitable example.

6 marks | Asked in 2071

Sequence Diagrams are interaction diagrams that detail how operations are carried out. They capture the interaction between objects in the context of a collaboration. Sequence Diagrams are time focus and they show the order of the interaction visually by using the vertical axis of the diagram to represent time what messages are sent and when.

Some basic sequence diagram notation are:

1. Class Roles or Participants: Class roles describe the way an object will behave in context. Use the UML object symbol to illustrate class roles, but don't list object attributes.

Object symbol - Sequence diagram

2. Activation or Execution Occurrence: Activation boxes represent the time an object needs to complete a task. When an object is busy executing a process or waiting for a reply message, use a thin gray rectangle placed vertically on its lifeline.

Activation - Sequence diagram

3. Messages: Messages are arrows that represent communication between objects. Use half-arrowed lines to represent asynchronous messages. Asynchronous messages are sent from an object that will not wait for a response from the receiver before continuing its tasks.

Messages - Sequence diagram

4. Lifelines: Lifelines are vertical dashed lines that indicate the object's presence over time.

Lifeline - Sequence diagram

Example: Sequence diagram for ATM system

Automated Teller Machine (ATM) - UML