---
title: "Algorithmic vs object-oriented decomposition"
subject: "Object Oriented Analysis and Design"
chapter: 1
key: "semester_6/object_oriented_analysis_and_design:algorithmic-vs-oo-decomposition"
source: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/algorithmic-vs-oo-decomposition
site: BCT Engineering
---

# Algorithmic vs object-oriented decomposition

Object Oriented Analysis and Design · Chapter 1: Object Oriented Fundamentals

- Asked in: 2070 Bhadra, 6+4 marks
- Video: [LECTURE 29 –OOAD –ALGORITHMIC DECOMPOSITION AND OBJECT ORIENTED DECOMPOSITION - BCA SEM 6](https://www.youtube.com/watch?v=zI5-RtUcwxY) — BOSCOCAMPUSVISION
- 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/algorithmic-vs-oo-decomposition
- Whole chapter: https://www.bctengineer.com/md/semester_6/object_oriented_analysis_and_design/chapter-1

## Question

What are the differences between algorithmic decomposition and object-oriented decomposition in the process of systems analysis for a complex system? What is the role of hierarchy, another feature of object-orientation, in such decomposition process?

## Short answer

Algorithmic decomposition breaks a system into functions and processes, keeping data separate and often global, making data changes propagate. Object-oriented decomposition breaks it into objects encapsulating data and behavior, localizing change. Hierarchy (is-a and part-of) organizes classes, enabling reuse, polymorphism, and manageable complexity.

## Answer

**Decomposition** means breaking a complex system into smaller, manageable parts. There are two approaches: algorithmic (functional) and object-oriented.

#### Differences

| Point | Algorithmic decomposition | Object-oriented decomposition |
|---|---|---|
| Basis | Steps/functions (verbs) | Objects/classes (nouns) |
| Question asked | "What happens next?" | "Who is responsible for what?" |
| Focus | Process/algorithm | Entities with state and behaviour |
| Data | Shared, separate from functions | Encapsulated inside objects |
| Model | DFD, structure chart, flowchart | Class, sequence, use case diagrams |
| Change | A data change affects many functions | Change is localised in a class |
| Reuse | Reuse of functions | Reuse of classes, inheritance |
| Complexity handling | Weak for large systems | Better: models real-world entities |

**Example (library system):**
- Algorithmic: `search_book()` -> `issue_book()` -> `calculate_fine()` -> `return_book()`.
- Object-oriented: classes `Book`, `Member`, `Librarian`, `Loan`, each with its own data and operations that collaborate.

```text
 Algorithmic          Object-oriented
 -----------          ---------------
  Main                 Member --- Loan --- Book
  +- Issue                \         |
  +- Return                +- Librarian
  +- Fine
```

#### Role of hierarchy
Hierarchy is the ranking or ordering of abstractions, and is the main tool that makes object-oriented decomposition manageable. Booch identifies two kinds:
- **"is-a" hierarchy (inheritance):** `Student` and `Teacher` are kinds of `Person`. Common structure and behaviour sit at the top and are inherited, so they are written once.
- **"part-of" hierarchy (aggregation):** a `Library` has `Books`, `Members`; a `Computer` has a `CPU`, `Disk`. A complex object is understood as an assembly of simpler parts.

Hierarchy therefore organises the classes found during decomposition into layers, reduces duplication, allows polymorphism, and lets the analyst study the system at several levels of detail.

## Check yourself

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

1. On what basis does algorithmic decomposition break up a system, compared with OO decomposition?
   A. Algorithmic uses objects/nouns; OO uses steps/verbs
   B. Algorithmic uses steps/functions (what happens next); OO uses objects/classes (who is responsible for what)
   C. Both use classes
   D. Algorithmic uses inheritance; OO uses flowcharts only
   Answer: B. Algorithmic decomposition is verb/step based, OO is noun/object based. (Key point: Basis of decomposition)

2. Why is change easier in OO decomposition?
   A. Data is shared and global
   B. Data is encapsulated inside objects, so a change is localised in a class
   C. Functions are reused everywhere
   D. There are no classes to update
   Answer: B. In algorithmic designs a data change affects many functions; in OO it stays within the class. (Key point: Effect of change)

3. What does the 'is-a' hierarchy contribute to decomposition?
   A. Shows a Computer has a CPU
   B. Common structure and behaviour sit at the top and are inherited, so they are written once
   C. Separates data from functions
   D. Orders steps in time
   Answer: B. Inheritance (is-a) removes duplication; Student and Teacher inherit from Person. (Key point: is-a hierarchy)

4. Which is an example of the 'part-of' hierarchy?
   A. Student is a kind of Person
   B. A Computer has a CPU and Disk (aggregation)
   C. Circle.draw() versus Square.draw()
   D. A DFD process calls another process
   Answer: B. Part-of is aggregation: a complex object understood as an assembly of simpler parts. (Key point: part-of hierarchy)

## Related in Object Oriented Analysis and Design

- [Object oriented system and core concepts](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aoo-system-concepts-explained) — Object Oriented Analysis and Design, chapter 1
- [Exception class hierarchy from Throwable](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aexception-class-hierarchy-throwable) — Object Oriented Analysis and Design, chapter 4
- [Define object; method implements behavior](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Adefine-object-method-behavior) — Object Oriented Analysis and Design, chapter 1
- [Short note: Flow of object](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Ashort-note-flow-of-object) — Object Oriented Analysis and Design, chapter 2
- [Development process and mapping design to code](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Adevelopment-process-map-design-code) — Object Oriented Analysis and Design, chapter 4
- [Requirement elicitation and system behavior](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Arequirement-elicitation-in-ooa) — Object Oriented Analysis and Design, chapter 2

## Related in other subjects

- [Compare procedural and object oriented programming](https://www.bctengineer.com/question.md?key=semester_3%2Fobject_oriented_programming%3Aprocedural-vs-oop-compare) — Object Oriented Programming, chapter 1
- [Differences between T1 and E1 hierarchy](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3At1-vs-e1) — Communication Systems, chapter 5
- [Process versus thread differences](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Aprocess-vs-thread) — Embedded System, chapter 6, asked 4×
- [Process states and process hierarchy](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprocess-states-hierarchy) — Operating System, chapter 2
