Notes
Slide Show
Outline
1
Inheritance
  • Inheritance is a mechanism in OOP to design two or more entities that are different but share many common features.
    • Features common to all classes are defined in the superclass.
    • The classes that inherit common features from the superclass are called subclasses.
      • We also call the superclass an ancestor and the subclass a descendant.



2
A Sample Inheritance
  • Here are the superclass Account and its subclasses Savings and Checking.
3
Inheritance Hierarchy
  • An example of inheritance hierarchy among different types of students.