Question: Write a program that prompts the user to enter the center x-, y coordinates, width, and height of two rectangles and determines whether the second
Write a program that prompts the user to enter the center x-, y coordinates, width, and height of two rectangles and determines whether the second rectangle is inside the first or overlaps with the first, as shown in Figure below. Test your program to cover all cases. (a) A rectangle is inside another one. (b) A rectangle overlaps another one. Here are the sample runs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
