PROGRAMMING:Design a rectangle class Rectangle
Design a class named rectangle to represent rectangle. This class includes:
*Two double type data fields named width and height represent the width and height of the rectangle, respectively. The default values for both width and height are 1.
*A parameterless construction method for creating a default rectangle.
*A construction method for creating rectangles with specified width and height values.
*A method called getarea() returns the area of the rectangle.
*A method called getperimeter() returns the perimeter.
Write a test program, input the height and width of two rectangles respectively, and create two rectangle objects. Displays the width, height, area, and perimeter of each rectangle in order.
###Input format:
nothing
###Output format:
Each line outputs the width, height, area and perimeter of a rectangle separated by spaces
###Input example:
Here is a set of inputs. For example:
```in
4 40 160 88
```
###Output example:
The corresponding output is given here. For example:
```out
4.0 40.0 160.0 88.0
3.5 35.9 125.64999999999999 78.8
```
answer:If there is no answer, please comment
*Two double type data fields named width and height represent the width and height of the rectangle, respectively. The default values for both width and height are 1.
*A parameterless construction method for creating a default rectangle.
*A construction method for creating rectangles with specified width and height values.
*A method called getarea() returns the area of the rectangle.
*A method called getperimeter() returns the perimeter.
Write a test program, input the height and width of two rectangles respectively, and create two rectangle objects. Displays the width, height, area, and perimeter of each rectangle in order.
###Input format:
nothing
###Output format:
Each line outputs the width, height, area and perimeter of a rectangle separated by spaces
###Input example:
Here is a set of inputs. For example:
```in
4 40 160 88
```
###Output example:
The corresponding output is given here. For example:
```out
4.0 40.0 160.0 88.0
3.5 35.9 125.64999999999999 78.8
```
answer:If there is no answer, please comment