First page Back Continue Last page Overview Graphics
Inheritance, overloading and overriding
Recall
- with inheritance the behavior and data associated with the child classes are always an extension of the behavior and data associated with the parent class
In a child class you can
- redefine a method's implementation (override)
- a method that is inherited by the parent, and the child class wants to change its behavior
- define new methods with the same method name but different arguments (overload)
- different tasks are performed by each method but they share the same method name
Notes: