#include <iostream.h> class Graph ...{ public: Graph() ...{ } double GetArea() ; double GetPerimeter() ; }; class Circle : public Graph ...{ double r; public: Circle() ...{ r=5.6; } double GetArea() ...{ return3.1415*r*r; } double GetPerimeter() ...{ return2*3.1415*r; } }; class Rect : public Graph ...{ double l,w; public: Rect() ...{ l=3; w=4; } double GetArea() ...{ return l*w; } double GetPerimeter() ...{ return2*l*w; } }; class Square : public Rect ...{ double l; public: Square() ...{ l=8; } double GetArea() ...{ return l*l; } double GetPerimeter() ...{ return4*l; } }; void main() ...{ Graph *p; Circle cir; p=○ cout<<"The Area of the circle="<<p->GetArea()<<endl; cout<<"The perimeter of the circle="<<p->GetPerimeter()<<endl; Rect rect; p=▭ cout<<"The area of the rectangle="<<p->GetArea()<<endl; cout<<"the perimeter of the rectangle="<<p->GetPerimeter()<<endl; Square sq; p=&sq; cout<<"The area of the square="<<p->GetArea()<<endl; cout<<"The perimeter of the square="<<p->GetPerimeter()<<endl;