Skip to main content

Algorithmic vs object-oriented decomposition

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.

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?

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

Differences

PointAlgorithmic decompositionObject-oriented decomposition
BasisSteps/functions (verbs)Objects/classes (nouns)
Question asked"What happens next?""Who is responsible for what?"
FocusProcess/algorithmEntities with state and behaviour
DataShared, separate from functionsEncapsulated inside objects
ModelDFD, structure chart, flowchartClass, sequence, use case diagrams
ChangeA data change affects many functionsChange is localised in a class
ReuseReuse of functionsReuse of classes, inheritance
Complexity handlingWeak for large systemsBetter: 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.
 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.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Object Oriented Analysis and Design chapter 1 questions →