Inheritance and Virtual Functions

1. Objectives
In this lab you will gain experience with inheritance and virtual functions, which are powerful aspects of
C++ that allow new types of code re-use. You will do this by enhancing a program that can store,
manipulate, and draw a database of shapes.
2. Problem Statement
The bulk of the processing necessary to manage the database of shapes already exists, and without
changing this code you will add new functionality simply by adding three new classes (Circle, Rectangle
and Polygon). This is an example of adding new features to an existing framework. The framework
provides the “higher-level” decision making of the program, and you add new features by creating new<

Leave a Reply

Your email address will not be published. Required fields are marked *