//A very simple class #include using namespace std; //Rectangle class declaration class Rectangle { private: double width; double length; public: Rectangle(); //constructor Rectangle(double, double); //constructor void setWidth(double); void setLength(double); double getWidth() const; double getLength() const; double area() const; }; Rectangle::Rectangle() { width=1; length=1; } //constructor Rectangle::Rectangle(double w, double l) { width=w; length=l; } //constructor void Rectangle::setWidth(double w) { width=w; } //setWidth void Rectangle::setLength(double l) { length=l; } //setLength double Rectangle::getWidth() const{ return width; } //getWidth double Rectangle:: getLength() const{ return length; } //getWidth double Rectangle::area() const{ return width*length; } //getArea int main() { Rectangle box; //box is an instance of Rectangle class box.setWidth(5); //set member attribute width box.setLength(8); //set member attribute length Rectangle crate; //crate is an instance of Rectangle class 1x1 Rectangle carton(3,6); //carton is declared using constructor 3x6 cout<<"Area of box is "<