Java AP LESSON WORK QUESTION 1
– HIT TEST a)
Create a simple class called Rectangle that has the following parameters: ·
x
– the x-coordinate of the top left point of the rectangle ·
y
– the y-coordinate for the top left point of the rectangle ·
w
– the width of the rectangle ·
h
– the height of the rectangle b)
You will now create another class called RectangleTester
that will contain your main method. Inside
it, create two Rectangle objects named r1 and r2. |