Delegation

Back to Composition vs Inheritance

An object forwards requests to a contained helper object rather than handling them directly. This enables code reuse through composition without the coupling of inheritance, and allows behavior to be swapped at runtime.

property composition delegation