- 2070 Bhadra · 6+4 marks
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
| 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.
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):
StudentandTeacherare kinds ofPerson. Common structure and behaviour sit at the top and are inherited, so they are written once. - "part-of" hierarchy (aggregation): a
LibraryhasBooks,Members; aComputerhas aCPU,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)
Related questions
- Object oriented system and core concepts · Object Oriented Analysis and Design, chapter 1
- Exception class hierarchy from Throwable · Object Oriented Analysis and Design, chapter 4
- Define object; method implements behavior · Object Oriented Analysis and Design, chapter 1
- Short note: Flow of object · Object Oriented Analysis and Design, chapter 2
- Development process and mapping design to code · Object Oriented Analysis and Design, chapter 4
- Requirement elicitation and system behavior · Object Oriented Analysis and Design, chapter 2
- Compare procedural and object oriented programming · Object Oriented Programming, chapter 1
- Differences between T1 and E1 hierarchy · Communication Systems, chapter 5
- Process versus thread differences · Embedded System, chapter 6 · asked 4×
- Process states and process hierarchy · Operating System, chapter 2
All Object Oriented Analysis and Design chapter 1 questions →