HAS-A relationship: One class has an instance variable of another class type (composition, not inheritance).
How to apply it: Distinguish HAS-A (composition) from IS-A (inheritance) when designing class relationships.
Course: AP Computer Science A · Unit: Inheritance
Practice questions about HAS-A relationship on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.