intermediateOOP Fundamentals for LLD
Composition vs Inheritance — when should you prefer one over the other?
Tests whether you know 'favor composition over inheritance' isn't a blanket rule but depends on whether an IS-A relationship genuinely holds.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
Composition vs Inheritance — when should you prefer one over the other?