Pacific-Design.com

    
Home Index

1. Design Patterns

2. Polymorphism

Design Patterns / Polymorphism /

Polymorphism


 +----------------+
 |   Super Class  |
 +----------------+
       |
       V
    Has Sub Classes with the same Method names
       that implements different behavior

Abstract Class

 +----------------+
 | Abstract Class |
 +----------------+
       |
       V
    1. Can be inherited from
    2. Cannot be instantiated

Interface

 +----------------+
 |   Interfaces   |
 +----------------+
       |
       V
    1. Has Method names only 
    2. Does not have implementation
    3. Any class implement Interface must implement methods