Delegation

Origin: Grand 98
Reason: An object needes to be different subclasses at different times.
Synopsis: Extend a class C by writing an additional class D with added funtionality that uses instances of C.
Example: An airline reservation system has roles such as flight crew, passenger, ticket agent,etc. A person can play different roles at different times, and more than one role at a time. Inheritance makes this impossible.
Solution:
Delegator Uses Delegate(s). Person
Delegate Specializes DelegateIF to a specific subclass. Flight crew, Passenger, etc.
DelegateIF Base class or interface of all Delegates. Role
See also: Bridge
Decorator
Facade
Proxy
State
Strategy