#include using namespace std; class Rectangle { private: int width, height; public: Rectangle(int w, int h); void setWidth(int w); void setHeight(int h); int getWidth(); int getHeight(); friend void modifyDimensions(Rectangle& r, int dw, int dh); }; Rectangle::Rectangle(int w, int h) { width = w; height = h; } void Rectangle::setWidth(int w) { width = w; } void Rectangle::setHeight(int h) { height = h; } int Rectangle::getWidth() { return width; } int Rectangle::getHeight() { return height; } void modifyDimensions(Rectangle& r, int dw, int dh) { r.width += dw; r.height += dh; }