|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
ABSTRACT
Polymorphism is an important object-oriented programming concept in which objects from two or more different classes respond to the same set of messages. For instance, HourlyEmployee, SalariedEmployee, and ContractEmployee all respond to the message calculatePay(). Instances of each class "do the right thing" to calculate their pay even though the methods to do so may be quite different. But the payroll program using these classes doesn't care - it can ask each object for the amount owed without caring what kind of employee it represents or how the amount is calculated.The panelists are all instances of subclasses of Professor which will respond to the following queries. Since each of the subclasses implement these queries differently, the answers will usually be different as well!• polymorphPreconditions(): The object (professor) specifies the information students must know before polymorphism is introduced in their class.• polymorphPresentation(): The object (professor) describes how polymorphism is introduced in their class.• polymorphStudentUsage(): The object (professor) describes how their students use polymorphism later in the course.• answerQuestions(): The object (professor) responds to any questions about their approach. INDEX TERMS
Primary Classification:
Additional Classification:
General Terms:
Collaborative Colleagues:
|
||||||||||||||||||||||||