logo

Module 10 Inheritance, Virtual Functions, and Polymorphism

In the language of C++, a class that is inherited is called a base class. The class that does the inheriting is called a derived class. Therefore, a derived class is a specialized version of a base class. A derived class inherits all of the members defined by the base class and adds its own, unique elements. C++ implements inheritance by allowing one class to incorporate another class into its declaration. This is done by specifying a base class when a derived class is declared. Let’s begin with a short example that illustrates several of the key features of inheritance....
DMCA.com Protection Status Copyright by webtailieu.net