Computer Science G175 - C++ ProgrammingAssignment 8Assignment_8.cpp (3 points)Create a class rectangle. The class should have data members lengthand widthof type float, each of which defaults to 1. The class should have member functions that calculate the perimeter()and the area()of the rectangle. It should also have separate set() and get() functions for both the length and width (set_length(), get_length(), set_width(), get_width()).The set_length() and set_width() functions should require the user to enter length or width data values greater than zero and less than or equal to 20.0. These functions should examine the data entered by the user, and accept the data only if it is in the specified range (0 < data <= 20.0). If the data is not in this range, the user should be reminded of the allowed data range and prompted to enter the data again. This cycle should repeat until the user enters a correct data value. This can be accomplished by using a do while loop in each set() function.
This is the end of the preview.
access the rest of the document.