#include #include "rectangle.h" using namespace std; rectangle::rectangle(int newx, int newy, int newwidth, int newheight): shape(newx, newy) { setwidth(newwidth); setheight(newheight); } int rectangle::getwidth() { return width_; } int rectangle::getheight() { return height_; } void rectangle::setwidth(int newwidth) { width_ = newwidth; } void rectangle::setheight(int newheight) { height_ = newheight; } void rectangle::print() { cout << " Rectangle " << endl; cout << " x = " << x_ << endl; cout << " y = " << y_ << endl; cout << " width = " << width_ << endl; cout << " height = " << height_ << endl; }