#include #include #include using namespace std; class Rectangle { private: int width, height; public: Rectangle(int w, int h); Rectangle(int s); Rectangle(); void setWidth(int w); void setHeight(int h); int getWidth() const; int getHeight() const; }; Rectangle::Rectangle(int w, int h) : width(w), height(h) { } Rectangle::Rectangle(int s) : width(s), height(s) { } Rectangle::Rectangle() { srand(time(NULL)); width = rand() % 10 + 1; height = rand() % 10 + 1; } void Rectangle::setWidth(int w) { width = w; } void Rectangle::setHeight(int h) { height = h; } int Rectangle::getWidth() const { return width; } int Rectangle::getHeight() const { return height; }