Index of /~myers/cop3330/examples/inher/shape/shape2

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]main.cpp 2013-11-12 00:21 1.3K 
[TXT]shape.cpp 2013-11-12 00:11 3.4K 
[TXT]shape.h 2013-11-12 00:11 2.0K 

Shape2 example

In this version, the Shape, Circle, and Rectangle classes are exactly the same as in the Shape 1 example. This one changes up the main.cpp test program to illustrate the important property that:

a base class pointer can be attached to an object derived from that base type

Also note that these pointers CAN be used to call upon functions in the Shape class (because they are of type Shape*), but they CANNOT be used to call Print() and Area(), because those functions are NOT in class Shape().

You can uncomment the last block to demonstrate this.