Object-Oriented Programming (OOP)
What term describes the following? a design guideline suggesting that building complex behavior by combining objects is often preferable to relying solely on class inheritance.
- A. Destructor
- B. Instance variable
- C. Composition over inheritance ✓
- D. Super keyword
Correct answer
C. Composition over inheritance
Explanation
Composition over inheritance refers to a design guideline suggesting that building complex behavior by combining objects is often preferable to relying solely on class inheritance.