lect2

Post on 20-Nov-2014

541 Views

Category:

Education

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

Object oriented programming

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