In Class - class

Create a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has member functions to calculate the perimeter and the area of the rectangle. It has set and get functions for the attributes.. Set should verify the attribute is a floating point number larger than 0.0 and less than 20.0.

  1. What is the class called.?
    _____________________________
  2. What data members are in the class?
    ____________________________
  3. What access modifier should the data member have?
    ____________________________
  4. What member functions need to be defined?
    ____________________________
    ____________________________
    ____________________________
    ____________________________
    ____________________________
    ____________________________
  5. What does the prototype look like for the area member function?
    _________________________________
  6. What does a get for length prototype look like?
    __________________________________
  7. What does a set for length prototype look like?
    ___________________________________
  8. Write the function for area.






  9. How would the area function be invoked?


  10. Do we need multiple (overloaded) functions for the contruction?
    It should be able to handle the following instances.

    Rectangle a;

    Rectangle b(20.0); // Set the length

    Rectanglec(10.0,10.0) // set the length and widt

  11. Write the constructor


    .
    .
    .
    .
    .
    .
  12. What does the header file look like for this project??













  13. Write the member functions












  14. Write the main file.












  15. Compile the project and run it!