#include "shapes.h" class rect:public shapes{ private: int x1, y1, x2, y2; public: rect():shapes(),x1(-1),y1(-1),x2(-1),y2(-1){} rect(int a, int b, int c, int d):x1(a),y1(b),x2(c),y2(d){ area = (x2-x1)*(y2-y1); } void print(){ cout << "rect area = " << area << endl; cout << "rect x1 = " << x1 << endl; cout << "rect y1 = " << y1 << endl; cout << "rect x2 = " << x2 << endl; cout << "rect x2 = " << x2 << endl; } };