/* * rect_ex1.cpp * * Created on: Nov 30, 2018 * Author: johnsontimoj */ ///////////////////////////////////////////// // program to test the Rectangle class //////////////////////////////////////////// #include #include "Rectangle.h" using namespace std; int main(void){ Rectangle rect1; double w; double l; //////////// // user input /////////// cout << "What is the width of the desired rectangle? "; cin >> w; rect1.setWidth(w); cout << "What is the length of the desired rectangle? "; cin >> l; rect1.setLength(l); /////////////// // confirmation output ////////////// cout << "Your rectangle parameters are \n"; cout << "Width = " << rect1.getWidth() << endl; cout << "Length = " << rect1.getLength() << endl; cout << "Area = " << rect1.getArea() << endl; system("pause"); return 0; }