Hi, I am new to programming and I need anyone's help on this.
"Creat a class Rectangle. The class attributes length and width, each of which default to 1. It has member functions that calculate the perimeter and the area of the rectangle. It has set and get functions for both length and width. The set functions should verify that length and width are each floating point numbers larger than 0.0 and less than 72.12.
Here's what I have so far, and can't go beyond this:
#include <iostream.h>
class Rectangle // Class Rectangle
{
public:
Rectangle(float=1, float=1); // Constructor
double perimeter(float, float); // Perimeter function
double area(float, float); // Area funcion
void set(float, float);
void get(float, float);
private:
float length;
float width;
}; // End of class Rectangle
Rectangle::Rectangle(float L, float W) // Scope function
{
}
double Rectangle:erimeter(float L, float W, float H)
{
}
double Rectangle::area(float L, float W, float H)
{
}
void Rectangle::set(float L, float W)
{
length =
}
void Rectangle::get(float L, float W)
{
}
int main() // main()
{
return 0;
} // End of main()
Thanks