Tuesday, 10 September 2013

Inheritance Mechanism

- A class may inherit from a base class. The inheriting class is called a derived class.
- Inheritance can be viewed as an incremental refinement of a base class by a new derived class.
- The derived class has all the fields and methods the base class has, plus new ones it defines.
- A class may override inherited methods(member functions), but not inherited data.
- A hierarchy of related classes, that share code and data, is created.



No comments:

Post a Comment

Blog Archive