Create an example of an overloaded method show a simple class definition for a class called MyRect,
which defines a rectangular shape. The MyRect class must have four instance variables to define the
upper left and lower right corners of the rectangle: x1, y1, x2, and y2.
When a new instance of the myRect class is initially created, all its instance variables are initialized to
0.
define a buildRect() method ( by using Point objects rather than individual coordinates ) that takes
four integer arguments and “resizes” the rectangle to have the appropriate values for its corners,
returning the resulting rectangle object You can overload buildRect() so that its parameter list takes
two Point objects (note that you’ll need to import the Point class at the top of your source file so
Java can find it)
To finish up this example, create a method to print out the rectangle’s coordinates, and a main()
method to test it all