Ch 6. Polymorphism
Introduction
C++ does not include the concept of interface.
Figure 6.1 Animal Kingdom in Java
Figure 6.2 Animal Kingdom in C++
Virtual & Non-virtual Overriding
Example of overriding
Impact of Virtual on Size
Obtaining Type Information from a Dynamic Value
Abstract Classes
Example of Abstract Classes
Downcasting (Reverse Polymorphism)
Example of Downcasting
Simulating the Dynamic Cast
Name Resolution
A Forest, Not a Tree
Virtual Destructors
Example of Destructors
Private Inheritance
Example of Private Inheritance
Inheritance and Arrays
Overloading
Email: budd@cs.orst.edu
Home Page: http://www.cs.orst.edu/~budd