Question
Write a java program that prompts the user to enter the center (x,y) coordinates, width, and height of two rectangles. Your program should then determine
Write a java program that prompts the user to enter the center (x,y) coordinates, width, and height of two rectangles.
Your program should then determine one of the following situations:
- The first rectangle is inside the second rectangle
- The second rectangle is inside the first rectangle
- The rectangles overlap (their boundaries cross each other)
- The rectangles do not touch each other, neither is inside of the another
Test your program to cover all cases.
You should return 4 screenshots of the output of your program run showing the values entered and the output of the program for 4 different input value set, each corresponding a different situation cited above. Your screenshots should be in one of the well-known picture formats, such as jpg or gif.
You should also send your java source code in a program code file with a name similar to your_surname.java.
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