In this chapter you will learn: The concept of polymorphism, to use overridden methods to effect polymorphism, to distinguish between abstract and concrete classes, to declare abstract methods to create abstract classes, how polymorphism makes systems extensible and maintainable, to determine an objects type at execution time. to declare and implement interfaces. | 10 Object-Oriented Programming: Polymorphism One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. John Ronald Reuel Tolkien General propositions do not decide concrete cases. Oliver Wendell Holmes A philosopher of imposing stature doesn’t think in a vacuum. Even his most abstract ideas are, to some extent, conditioned by what is or is not known in the time when he lives. Alfred North Whitehead Why art thou cast down, O my soul? Psalms 42:5 OBJECTIVES In this chapter you will learn: The concept of polymorphism. To use overridden methods to effect polymorphism. To distinguish between abstract and concrete classes. To declare abstract methods to create abstract classes. How polymorphism makes systems extensible and maintainable. To determine an objects type at execution time. To declare and implement interfaces. Introduction Polymorphism Examples Demonstrating Polymorphic Behavior Abstract . | 10 Object-Oriented Programming: Polymorphism One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. John Ronald Reuel Tolkien General propositions do not decide concrete cases. Oliver Wendell Holmes A philosopher of imposing stature doesn’t think in a vacuum. Even his most abstract ideas are, to some extent, conditioned by what is or is not known in the time when he lives. Alfred North Whitehead Why art thou cast down, O my soul? Psalms 42:5 OBJECTIVES In this chapter you will learn: The concept of polymorphism. To use overridden methods to effect polymorphism. To distinguish between abstract and concrete classes. To declare abstract methods to create abstract classes. How polymorphism makes systems extensible and maintainable. To determine an objects type at execution time. To declare and implement interfaces. Introduction Polymorphism Examples Demonstrating Polymorphic Behavior Abstract Classes and Methods Case Study: Payroll System Using Polymorphism Creating Abstract Superclass Employee Creating Concrete Subclass SalariedEmployee Creating Concrete Subclass HourlyEmployee Creating Concrete Subclass CommissionEmployee Creating Indirect Concrete Subclass BasePlusCommissionEmployee Demonstrating Polymorphic Processing, Operator instanceof and Downcasting Summary of the Allowed Assignments Between Superclass and Subclass Variables final Methods and Classes Case Study: Creating and Using Interfaces Developing a Payable Hierarchy Declaring Interface Payable Creating Class Invoice Modifying Class Employee to Implement Interface Payable Modifying Class SalariedEmployee for Use in the Payable Hierarchy Using Interface Payable to Process Invoices and Employees Polymorphically Declaring Constants with Interfaces Common Interfaces of the .