Complete the class, named Rectangle, that creates a new rectangle, given the integer height (h) and width (w) of the rectangle. This means that the constructor has two parameters.

Recall that a square is a special case of a rectangle, with its height equal to its width. Hence, a square can be constructed as a Rectangle, with only a single parameter. This is a case of overloading the constructor, by having two constructor methods, each with different parameters than the other.

Besides the constructors, this class should include a method named perimeter, to compute the perimeter of the rectangle (2 x width + 2 x height), as well as a method named area to compute the area of the rectangle (width x height).

Complete the following file:

Rectangle.java

/** A rectangle with height and width. */ public class Rectangle { private int height; private int width; /** Constructs a rectangle. @param aHeight: the height of the rectangle @param aWidth: the width of the rectangle */ public Rectangle(int aHeight, int aWidth) { // your work here } /** Constructs a rectangle that is a square. @param aSide: the length of a side of the square */ public Rectangle(int aSide) { // your work here } /** Computes the perimeter. @return the perimeter of the rectangle */ public int perimeter() { // your work here } /** Computes the area. @return the area of the rectangle */ public int area() { // your work here } // This method is used for checking your work. Do not modify it public static String check(int h, int w, int sideSq) { Rectangle aRect = new Rectangle(h, w); Rectangle aSquare = new Rectangle(sideSq); return aRect.perimeter() + " " + aRect.area() + " " + aSquare.perimeter() + " " + aSquare.area(); } }