O'Reilly logo

An Introduction to Design Patterns in C++ with Qt 4 by Paul Ezust, Alan Ezust

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 6. Inheritance and Polymorphism

This chapter introduces the concepts and shows some examples of how to define inheritance relationships between C++ classes. Overriding methods, the virtual keyword, and simple examples show how polymorphism works.

6.1

Simple Derivation

136

6.2

Derivation with Polymorphism

142

6.3

Derivation from an Abstract Base Class

148

6.4

Inheritance Design

152

6.5

Overloading, Hiding, and Overriding

154

6.6

Constructors, Destructors, and Copy Assignment Operators

155

6.7

Processing Command-Line Arguments

158

Simple Derivation

Inheritance is a way of organizing classes that is supported by all object-oriented languages. ...

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