Question: Exercise: Assume you are provided with a text file ( squares . txt ) that records in each line two values x and y separated
Exercise:
Assume you are provided with a text file squarestxt that records in each line two values and y separated
by a : representing the top leftcorner of square with side length The Figure below shows a sample of
such text file.
Write a program named SquaresIntersection that:
constructs a Rectangle object square representing a square where its Topleft corner and
side length
prints its location by calling System.out.printlnsquare
for each square recorded in the input file, prints the result of the
intersection method when the square and overlap if they were drawn
they will look like the figure at right
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
