Question: Write a program called FourRectanglePrinter that constructs a Rectangle object, prints its location by calling System.out.println(box), and then translates and prints it three more times,
Write a program called FourRectanglePrinter that constructs a Rectangle object, prints its location by calling System.out.println(box), and then translates and prints it three more times, so that, if the rectangles were drawn, they would form one large rectangle, as shown at right.
Your program will not produce a drawing. It will simply print the locations of the four rectangles.

Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
Here is a Java program that creates a Rectangle object prints its location and then translates it th... View full answer
Get step-by-step solutions from verified subject matter experts
