C++ Tutorials

C++ Tutorials

Inheritance is the process by which one object can acquire the properties of another object.

This is important because it supports the concept of classification. If you think about it, most knowledge is made manageable by hierarchical classifications. For example, a red delicious apple is part of the classification apple, which in turn is part of the fruit class, which is under the larger class food.

Without the use of classifications, each object would have to define explicitly all of its characteristics. However, through the use of classifications, an object need only define those qualities that make it unique within its class. It is the inheritance mechanism that makes it possible for one object to be a specific instance of a more general case. As you will see, inheritance is an important aspect of object-oriented programming.