1998 | OriginalPaper | Chapter
Inheritance
Author : W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Published in: Mastering C++ Programming
Publisher: Macmillan Education UK
Included in: Professional Book Archive
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
This chapter deals with the very important topic of inheritance. Much of the material dealt with so far has been presented in order that you will be able to use and understand inheritance, as it applies to C++. It is therefore important that you are fully conversant with the material covered in the previous chapters. We look first of all at single inheritance, where one class inherits attributes and methods from another (base) class. In our discussion of single inheritance we take a look at the different levels of access provided by the private, protected and public keywords. We examine when name clashes between functions can occur and how to resolve them. In sections 8.3 and 8.7 we look at how classes can be descended from more than one base class and see when multiple inheritance might be required. Sections 8.4 and 8.5 deal with the important topics of virtual functions and abstract classes.