Extending the functionality of a class using inheritance, or inheriting for no reason other than to reference parent class methods in a child class, does not work for every situation. There is another form of access to a class methods that does not entail inheritance. It is called delegation.
Delegation suggests access to a class method by direct call rather than access through inheritance.
Delegation sounds like your basic method message, but a delegate is a lot more than a method call. The most important difference is that a delegate is a means of accessing functionality at runtime, while the use of a class is defined at design time. Before we look at delegates in detail, let s first understand why inheritance is not always the panacea it is often made out to be. First, inheritance works when you are dealing with objects that represent a collection or a group with similar traits. A good example is that all canines howl, especially at a full moon.