<<< Superclasses and subclasses     Index     Polymorphism >>>

6. Is-a relationship


  • Is-a relationship suggests that both circle and square are shapes.

  • Note that Circle, Star, and Square can independently draw themselves.

  • Such architecture supports polymorphism, or polymorphic behavior of a shape.

  • The shape hierarchy:

      shape hierarchy

<<< Superclasses and subclasses     Index     Polymorphism >>>