O'Reilly logo

C++ How to Program, Sixth Edition by H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Object-Oriented Programming: Inheritance

 

Say not you know another entirely, till you have divided an inheritance with him.

 
 --Johann Kasper Lavater
 

This method is to define as the number of a class the class of all classes similar to the given class.

 
 --Bertrand Russell
 

Good as it is to inherit a library, it is better to collect one.

 
 --Augustine Birrell
 

Save base authority from others’ books.

 
 --William Shakespeare

OBJECTIVES

In this chapter you’ll learn:

  • To create classes by inheriting from existing classes.

  • How inheritance promotes software reuse.

  • The notions of base classes and derived classes and the relationships between them.

  • The protected member access specifier.

  • The use of constructors and destructors in inheritance hierarchies. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required