an implementation mechanism in which an object, responding to an operation on itself, forwards the operation to another object; a mechanism in which methods may be attached directly to instances and where the method resolution is performed by searching a chain of instance pointers, rather than by searching a class heirarchy.
A way of extending a class in an object-oriented framework. In object-oriented design methodology, delegation is a form of class composition.
a subclass of an interface class
An object requests that a service (or work) be performed by another object rather than doing the work itself. Divides the main object and its implementation into separate object hierarchies. There are two ways to implement delegation:- Aggregate relationship- Associative relationship
Like inheritance in that a class definition is defined in terms of other class definitions but not necessarily via a static class hierarchy and often dynamically at runtime so that new dependencies can be added. Microsoft COM does not support inheritance but does support a kind of delegation allowing new behaviors to be added to running systems (an advantage).
This pattern is one where a given object provides an interface to a set of operations. However, the actual work for those operations is performed by one or more other objects.
The ability of an object to issue a message to another object in response to a message. Delegation can be used as an alternative to inheritance. Synonym: delegation [OMA].Contrast: inheritance.
In object-oriented programming there are two related notions of delegation.