Skip to main content
InterviewHubPRO
Section Overview
Q8

Question 8 of 50

Part 1: Core SOLID Principles & Fundamentals (1 - 10)

16%
SOLID & OOP Principles (50 Qs)•Part 1: Core SOLID Principles & Fundamentals (1 - 10)

Why does Composition over Inheritance prevent the Fragile Base Class problem?

junior LevelMost Askedsolid-principlesCore SOLID Principles

In Simple Words: Inheritance is the tightest coupling in OOP because subclasses depend on the internal implementation details of the superclass. A change in the parent class can silently break subclass invariants (Fragile Base Class). Composition delegates behavior via interfaces, keeping boundaries clean and independently testable.