Composition over Inheritance
← Back to Object-Oriented Programming (OOP)
A design principle that favors building complex objects by combining simpler ones (has-a relationships) rather than through class hierarchies (is-a relationships). Composition provides greater flexibility, looser coupling, and avoids the fragile base class problem.