Micro-Topic 13.1: HAS-A vs IS-A – Composition vs Inheritance
Learning Goal: Distinguish between composition (HAS-A relationships) and inheritance (IS-A relationships) and know when each is appropriate.
Micro-Topic 13.2: Implementing Composition in Java
Learning Goal: Learn how to implement a HAS-A relationship in Java classes and use object references as members.
Micro-Topic 13.3: Real-World Modeling with Composition
Learning Goal: Apply composition to model real-world objects and scenarios in code, mirroring true relationships (part-whole) rather than forcing inheritance.
Micro-Topic 13.4: When to Favor Composition Over Inheritance
Learning Goal: Understand the benefits of composition and why it’s often preferred for flexibility and maintainability.
Micro-Topic 13.5: Case Study – Modeling a Car with Composition
Learning Goal: Demonstrate how to apply composition in a practical example by designing a class with multiple components.