Explore Library
Quiz

Composition vs Inheritance Patterns

Understand which design patterns favor composition to add behavior flexibly at runtime.

You need to add responsibilities to individual objects dynamically at runtime without altering other instances of the same class. Which design pattern best embodies 'composition over inheritance' for this goal?