O'Reilly logo

Navigating C++ and Object-Oriented Design by Gail Anderson, Paul Anderson

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

11.7. Private Derivation

Public derivation implements the “Is-A” relationship between two classes by providing polymorphism and subtypes with inheritance. Private derivation, by contrast, does not support the generalization principles of polymorphism and does not perform implicit pointer/reference conversions with subtypes. Private derivation is similar to containment and represents an “implemented by” association between two classes.

Private derivation prevents access to base class data members and operations for users. This type of inheritance specializes versions of classes that do not behave like their base class in all situations. Thus, the “Is-A” relationship does not hold with private derivation.

Here is the format for private derivation. ...

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