Summary/Review | page 8 of 10 |
Inheritance represents the "is a kind of" relationship between types of objects. In practice it may be used to add new features to an existing class. It is the primary tool for reusing your own and standard library classes. Inheritance allows a programmer to derive a new class (called a derived class or a subclass) from another class (called a base class or superclass). A derived class inherits all the data fields and methods (but not constructors) from the base class and can add its own methods or redefine some of the methods of the base class.
|