Difficulty: Easy
Correct Answer: Bottom-up manner (unit test lower-level modules first, then integrate)
Explanation:
Introduction / Context:
While design commonly follows a top-down decomposition, implementation and testing at the code level usually proceed bottom-up. Developers build and unit test foundational components, then integrate them progressively into higher-level modules, ensuring stability and isolating defects early.
Given Data / Assumptions:
Concept / Approach:
Bottom-up implementation starts with leaf modules. Each unit is tested with drivers or test harnesses. As confidence grows, modules are combined, and higher-level behavior is verified. This order localizes defects, shortens feedback cycles, and avoids blocking on incomplete upper-layer designs.
Step-by-Step Solution:
Verification / Alternative check:
Top-down testing without stable lower layers often requires stubs and yields fragile results; bottom-up reduces reliance on scaffolding and exposes foundational defects early.
Why Other Options Are Wrong:
Common Pitfalls:
Skipping harnesses or mocking leads to poor coverage; failing to define interface contracts causes integration churn.
Final Answer:
Bottom-up manner (unit test lower-level modules first, then integrate).
Discussion & Comments