#include using namespace std; class ShapeT { public: virtual void Draw(void) const = 0; virtual float Area(void) const = 0; virtual float Perimeter(void) const = 0; }; class Rectangle: public ShapeT { public: Rectangle(float w, float h): width(w), height(h) { } void Draw(void) const override { cout << "Drawing a rectangle" << endl; } float Area(void) const override { return width * height; } float Perimeter(void ) const override { return 2*width + 2*height; } private: float width; float height; }; class Circle: public ShapeT { public: Circle(float r): radius(r) { } private: float radius; }; int main() { //ShapeT shape; Rectangle r(1,2); //Circle c(2); return 0; }