<<< Encapsulation revisited     Index     Polymorphic Operations >>>

8. Polymorphism


  • Polymorphism means that if operation is invoked on a parent class, the implementation is supplied by a descendant class.

  • Thus, an operation is said to be polymorphic when its implementation is supplied in a descendant class.

  • If operation implementation is supplied by the object on which tee operation was invoked, then the operations is said to be concrete.

  • Implementation of print operation is supplied by each of the descendant classes:

      printer hierarchy

<<< Encapsulation revisited     Index     Polymorphic Operations >>>