Chapter Summary
- Inheritance can be used to organize classes into hierarchies.
- Polymorphic variables are very powerful. Declared as one type, its
static type, but can maintain a value of a different type, its dynamic type.
Must be pointers or references.
- When a virtual method is called using a polymorphic variable, its
dynamic type is used.
- A virtual method that is declared but not defined is called a pure
virtual method. A class with a pure virtual method can not be instantiated.
It is called an abstract class.
prev
|top
|next