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

# Short note: Focus of control

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

- Asked in: 2070 Bhadra, 5 marks
- 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-focus-of-control
- Whole chapter: https://www.bctengineer.com/md/semester_6/object_oriented_analysis_and_design/chapter-2

## Question

Write a short note on Focus of control.

## Short answer

Focus of control is a thin vertical rectangle on a lifeline in a UML sequence diagram, showing the period an object is active, either executing code or waiting for a called operation. It begins when a message arrives and ends when control returns.

## Answer

**Focus of control** (activation) in a UML **sequence diagram** shows the period during which an object is performing an action, i.e. when it has control, either executing its own code or waiting for a called operation to return.

#### Notation
A thin vertical rectangle drawn on the object's lifeline, starting when the object receives a message and ending when it finishes and returns control. It is also called an activation bar (UML 1) or an execution specification (UML 2).

```text
 :Client       :Server       :Database
    |  request()  |              |
    |------------>|              |
    |            [ ]  query()    |
    |            [ ]------------>|
    |            [ ]            [ ] execute
    |            [ ]<- - - - - -[ ]
    |<- - - - - -[ ]             |
```
The bars show that `Server` is active from receiving `request()` until it replies, and `Database` only for the duration of `query()`.

#### Points
- The lifeline (dashed line) shows existence; the bar shows activity.
- Nested bars on the same lifeline show a self call (recursion).
- It shows which object controls the flow at any time, helps identify the duration of operations and the nesting of calls, and in procedural systems shows who holds the thread of control.
- For a **synchronous** call, the caller's bar continues until the callee returns; for an **asynchronous** call, the caller's bar may end or continue independently.

## Check yourself

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

1. Focus of control in a sequence diagram shows:
   A. The object's attributes
   B. The period an object is active
   C. The use cases
   D. The class hierarchy
   Answer: B. It shows when an object has control, executing or waiting for a call to return. (Key point: Definition)

2. It is drawn as:
   A. A thin rectangle on the lifeline
   B. A diamond
   C. A thick horizontal bar
   D. A dashed arrow
   Answer: A. The activation bar sits on the lifeline. (Key point: Notation)

3. What does the dashed lifeline show compared to the bar?
   A. Existence, while the bar shows activity
   B. Nothing
   C. Activity, while the bar shows existence
   D. Messages only
   Answer: A. Lifeline = existence; activation bar = activity. (Key point: Lifeline vs bar)

4. Nested bars on the same lifeline indicate:
   A. A new object
   B. A self call (recursion)
   C. A fork
   D. A return message
   Answer: B. Nested activations mean the object calls itself. (Key point: Nested bars)
