Difficulty: Easy
Correct Answer: Bottom-up
Explanation:
Introduction:
C++ supports multiple design approaches, but classic object-oriented design emphasizes composing larger systems from smaller, reusable components. This question checks recognition of that dominant perspective.
Given Data / Assumptions:
Concept / Approach:
OOP often follows a bottom-up approach: define classes encapsulating state and behavior, compose them into subsystems, then assemble applications. While top-down analysis is also used, the idiomatic C++/OOP workflow encourages building from objects upward.
Step-by-Step Solution:
1) Identify OOP building blocks: classes and objects.2) Create reusable components: containers, algorithms, services.3) Compose higher-level modules from these components.4) Integrate into full applications, leveraging encapsulation and inheritance.
Verification / Alternative check:
Standard libraries (e.g., STL) exemplify bottom-up reuse: generic containers and algorithms are composed to solve larger problems.
Why Other Options Are Wrong:
Top-down: more closely associated with procedural decomposition.Right-left / Left-right: not recognized software design paradigms.
Common Pitfalls:
Assuming OOP forbids top-down planning; in practice, teams blend both, but object modeling encourages bottom-up construction.
Final Answer:
Bottom-up
Discussion & Comments