#ifndef RECTANGLE_H #define RECTANGLE_H //class functions defined in line class Rectangle { private: double width; double length; public: // Default constructor Rectangle() { width = 1.0; length = 1.0; } // Parameterized constructor Rectangle(double w, double len) { width = w; length = len; } double getWidth() const { return width; } double getLength() const { return length; } //getArea() simply computes the area. //It does not store any info in class data. double getArea() const { return width * length; } }; #endif