Difficulty: Easy
Correct Answer: Containership (composition/aggregation)
Explanation:
Introduction / Context:
In object-oriented design, relationships between entities are described using specific mechanisms. The “Has a” relationship means one object owns, contains, or aggregates another object.
Given Data / Assumptions:
Concept / Approach:
“Has a” corresponds to composition or aggregation (containership). A car “has a” engine; a university “has” departments. The owner object holds references/fields of the component type.
Step-by-Step Solution:
Verification / Alternative check:
Class diagrams: a filled diamond (composition) or hollow diamond (aggregation) from whole to part is the standard notation.
Why Other Options Are Wrong:
They describe other OO concepts not matching ownership semantics.
Common Pitfalls:
Confusing inheritance (“is a”) with composition (“has a”).
Final Answer:
Containership (composition/aggregation)
Discussion & Comments