(This exercise should be used in conjunction with Exercise 1 and 2.) Write a definition for a RectangleDriver class with a main method to do the following: Instantiate a Point called topLeft at x = −3.0 and y = 1.0. Instantiate a Point called bottomRight at x = 3.0 and y = −1.0. Instantiate a Rectangle called rectangle using topLeft and bottomRight as arguments. Call rectangle’s printCenter method. Use a single chained statement to shift the rectangle right by one and then up by one. Call rectangle’s printCenter method again. The output should be:
x = 0.0 y = 0.0
x = 1.0 y = 1.0
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.