Design a class named Rectangle to represent a rectangle. The…
Design a class named Rectangle to represent a rectangle. The class contains: Two data fields named width and height A constructor that creates a rectangle with the specified width and height. The default values are 1 and 2 for the width and height, respectively. A method named getArea() that returns the area of this rectangle. A method named getPerimeter() that returns the perimeter.
Read Details