#include #include "cylinder.h" using namespace std; int main ( ) { Point p ( 7, 11 ); Circle cir ( 3.5, 22, 8 ); Cylinder cyl ( 10, 3.3, 10, 10 ); cout << "Test 1:" << endl; p.printShapeInfo ( ); cout << endl; cout << "Test 2:" << endl; cir.printShapeInfo ( ); cout << endl; cout << "Test 3:" << endl; cyl.printShapeInfo ( ); cout << endl; Shape *ShapeArray[3]; ShapeArray[0] = &p; ShapeArray[1] = ○ ShapeArray[2] = &cyl; for ( int i = 0; i < 3; i ++ ) { cout << "Test " << i + 4 << ":" << endl; ShapeArray[i]->printShapeInfo ( ); cout << "GetArea = " << ShapeArray[i]->getArea ( ) << endl; cout << "GetVolume = " << ShapeArray[i]->getVolume ( ) << endl; cout << endl; } return 1; }