OOP & Design Patterns - Composition vs Inheritance - Favour Composition, Why & When
You are designing a system for different types of vehicles where some can fly and some can float on water. Which design approach best supports adding new capabilities like flying or floating without modifying existing vehicle classes?
