Difficulty: Easy
Correct Answer: Inheritance
Explanation:
Introduction / Context:
Design relationships can be summarized as “Is a/Kind of” for inheritance and “Has a” for composition/aggregation. Correctly mapping requirements to these helps create maintainable models.
Given Data / Assumptions:
Concept / Approach:
“Like a” or “Kind of” indicates specialization/generalization. A Square is a kind of Rectangle (inheritance). Composition instead expresses part–whole (a Car has an Engine).
Step-by-Step Solution:
Verification / Alternative check:
Class diagrams and Liskov Substitution Principle illustrate that a derived class is substitutable for its base — a hallmark of “kind of”.
Why Other Options Are Wrong:
They represent orthogonal concepts or the wrong relationship type.
Common Pitfalls:
Using inheritance where composition is more appropriate (leads to brittle designs).
Final Answer:
Inheritance
Discussion & Comments