Write this program in Java language OOP.
Create a class Rectangle with two instance variables - length of type double and width of type double.
Provide a parameterless constructor to the instance variables and set the values to 1.0.
Provide a Parameterized constructor to the instance variables using overloaded and chaining constructor.
Provide set and get methods for each of the instance variables. The set method should verify that length and width are each larger than 0.0 and less than 20.0, otherwise set to 1.
Provide methods to calculate the rectangle's area and perimeter. It should return the calculated area and perimeter using the toString method.
Read the length and width from the user.
Pass the values to the object.
Display the area and perimeter.
Note: Area = Length * Width, Perimeter = 2 * (Length + Width).
Sample Output:
1. Set Length
2. Set Width
3. Both Length and Width
4. Exit
Choice: 1
Enter length: 10
Length: 10.000000
Width: 1.000000
Perimeter: 22.000000
Area: 10.000000
1. Set Length
2. Set Width
3. Both Length and Width
4. Exit
Choice: 2
Enter width: 4
Length: 10.000000
Width: 4.000000
Perimeter: 28.000000
Area: 40.000000
1. Set Length
2. Set Width
3. Both Length and Width
4. Exit
Choice: 3
Enter length: 10
Enter width: 11
Length: 10.000000
Width: 11.000000
Perimeter: 42.000000
Area: 110.000000
1. Set Length
2. Set Width
3. Both Length and Width
4. Exit
Choice: 4
Thank you for using this program!!!!