Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please assist using Javadoc's API. box1: java.awt. Rectangle[x=10, y=10,width=40, height=30] 8) Now use the Rectangle class to complete the following tasks: - Create another object
Please assist using Javadoc's API.
box1: java.awt. Rectangle[x=10, y=10,width=40, height=30] 8) Now use the Rectangle class to complete the following tasks: - Create another object of the Rectangle class named box2 with a width of 100 and height of 50. Note that we are not specifying the x and y position for this Rectangle object. Hint: look at the different constructors) - Display the properties of box2 (same as step 7 above). Call the proper method to move box1 to a new location with x of 20, and y of 20. Call the proper method to change box2's dimension to have a width of 50 and a height of 30. Display the properties of box1 and box2. Call the proper method to find the smallest intersection of box1 and box2 and store it in reference variable box3. Calculate and display the area of box3. Hint: call proper methods to get the values of width and height of box3 before calculating the area. Display the properties of box3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started