Design a class named Rectangle to represent a rectangle. The class contains:
-
Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 (one) for both width and height.
-
A string data field named color that specifies the color of a rectangle. Hypothetically, assume that all rectangles have the same color. The default color is white.
-
A no-arg constructor that creates a default rectangle.
-
A constructor that creates a rectangle with the specified width and height.
-
A method named getArea() that returns the area of this rectangle.
-
A method named getPerimeter() that returns the perimeter.