// ****** file rectangle.cc // ****** contains the implimentation of the class Rectangle definitions #include "rectangle.h" using namespace std; //***************************************************************** // Rectangle -- Rectangle class constructor function definition * // This function assigns 0 to length and width * //***************************************************************** Rectangle::Rectangle() { length = 0; width = 0; } //***************************************************************** // Rectangle -- Rectangle class constructor function definition * // This function copies the argument l to private member length * // and w to private member width. * //***************************************************************** Rectangle::Rectangle(float l, float w) { length = l; width = w; } //***************************************************************** // getLength -- Rectangle class function definition * // This function returns the value in the private member length. * //***************************************************************** float Rectangle::GetLength() { return length; } //***************************************************************** // getWidth -- Rectangle class function definition * // This function returns the value in the private member width. * //***************************************************************** float Rectangle::GetWidth() { return width; } //***************************************************************** // getArea -- Rectangle class function definition * // This function returns the value in the private member area. * //***************************************************************** float Rectangle::GetArea() { return length * width; }