Download - Lect2
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).