object oriented programming by waqas

Post on 01-Dec-2014

806 Views

Category:

Education

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Object Oriented Programming

Lecture 2

Delegation

• Delegation refers to the delegating of responsibility and can be applied to inheritance

• When a derived class does not have a desired attribute, it "delegates" responsibility to one of its base classes

• In delegation systems, each object has a delegate list instead of a parent list

• delegation's primary emphasis is on message passing where an object could delegate responsibility of a message it couldn't handle to objects that potentially could (its delegates).

top related