---
title: "Short note: Sequence diagram"
subject: "Object Oriented Analysis and Design"
chapter: 2
key: "semester_6/object_oriented_analysis_and_design:short-note-sequence-diagram"
source: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/short-note-sequence-diagram
site: BCT Engineering
---

# Short note: Sequence diagram

Object Oriented Analysis and Design · Chapter 2: Object Oriented Analysis

- Asked in: 2069 Bhadra, 5 marks
- Video: [How to Make a UML Sequence Diagram](https://www.youtube.com/watch?v=pCK6prSq8aw) — Lucid Software
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/short-note-sequence-diagram
- Whole chapter: https://www.bctengineer.com/md/semester_6/object_oriented_analysis_and_design/chapter-2

## Question

Write a short note on Sequence diagram.

## Short answer

A sequence diagram is a UML interaction diagram showing object interactions in a use case scenario with time order top to bottom. Notation includes lifelines, activation bars, synchronous/asynchronous/return messages, self-messages, object creation/destruction, and combined fragments (alt, opt, loop). It models detailed flow, identifies class methods, and documents system behavior and test cases.

## Answer

A **sequence diagram** is a UML interaction diagram that shows how objects interact in a particular scenario of a use case, with the **time order of messages** emphasised. Time runs from top to bottom.

#### Notation
- **Object/participant:** rectangle at top, `name:Class`.
- **Lifeline:** vertical dashed line showing the object's existence over time.
- **Activation bar (focus of control):** thin rectangle on a lifeline while the object is executing.
- **Message:** horizontal arrow; solid with filled head = synchronous call, open head = asynchronous, dashed = return.
- **Self message:** arrow looping to the same lifeline.
- **Object creation/destruction:** a message to a new object box; an X at the end of a lifeline.
- **Combined fragments:** `alt`, `opt`, `loop` boxes for conditions and repetition.

```text
 :Customer    :ATM         :Bank
     | insertCard |           |
     |----------->|           |
     |            | verify()  |
     |            |---------->|
     |            |<- - - - - |
     |<- - - - - -|  ok       |
     |            |           |
```

#### Uses
- Model the flow of one use case scenario in detail.
- Identify the methods needed in classes.
- Document the system behaviour and test cases.

A **system sequence diagram** is a special case that treats the whole system as one black box lifeline and shows the actor's events.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does a sequence diagram emphasise?
   A. Static class structure
   B. The time order of messages between objects in a use case scenario
   C. Hardware nodes
   D. Module hierarchy
   Answer: B. Time runs from top to bottom. (Key point: Purpose of sequence diagram)

2. What do the lifeline and activation bar represent?
   A. Lifeline: object's existence over time (dashed vertical); activation bar: object executing
   B. Lifeline: message; activation bar: class
   C. Both are messages
   D. Lifeline: actor only
   Answer: A. The activation bar is the focus of control on a lifeline. (Key point: Notation)

3. How are message types drawn?
   A. Solid filled head: synchronous; open head: asynchronous; dashed: return
   B. Dashed: synchronous; solid: return
   C. All arrows are the same
   D. Filled head: asynchronous
   Answer: A. Combined fragments alt, opt and loop show conditions and repetition. (Key point: Message types)

## Related in Object Oriented Analysis and Design

- [Money transfer sequence diagram questions](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Amoney-transfer-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [Food ordering system sequence diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Afood-ordering-system-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [Explain online order sequence diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aorder-processing-sequence-diagram-explain) — Object Oriented Analysis and Design, chapter 2
- [ATM withdrawal sequence diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aatm-withdrawal-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [External actors and library system sequence diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aexternal-actors-library-system-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [Map sequence diagram to pseudo code](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aorder-model-mapping-pseudocode) — Object Oriented Analysis and Design, chapter 4

## Related in other subjects

- [Sequence detector 1011 state diagram and VHDL](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Avhdl-sequence-detector-1011) — Embedded System, chapter 9
- [Bridge single-phase cycloconverter conduction sequence](https://www.bctengineer.com/question.md?key=semester_7%2Fpower_electronics%3Abridge-cyclo-conduction-sequence) — Power Electronics, chapter 6, asked 3×
- [No zero sequence in line-to-line fault](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3All-fault-zero-sequence-absent) — Power System Analysis II, chapter 5, asked 2×
- [Direct sequence spread spectrum (DSSS)](https://www.bctengineer.com/question.md?key=semester_7%2Fwireless_communication%3Adsss-block-diagram) — Wireless Communication, chapter 4
