Explain it in 60 seconds
Composition over inheritance
Backend Engineering · OOP and Design Patterns · Beginner
What does "favour composition over inheritance" mean?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Build behaviour by combining objects ("has-a").
- Delegate to collaborators.
- Looser coupling than inheritance.
- Swap parts at runtime.
- Avoid deep class hierarchies.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.