First page Back Continue Last page Overview Graphics
Inheritance (an intuitive description)
Recall the Orange class
- properties found in Orange are also shared with other Fruits (e.g. Apple, Banana, Pineapple)
We associate behavior as well as state with with more abstract notions (e.g. Fruit). Oranges are a specialization of that abstraction.
In OO programming inheritance is a relationship between entities referred to as parents and children where
- the behavior and data associated with the child classes are always an extension of the properties associated with parent classes.
Notes: