Write a program that prompts the user to enter the center x-, y-coordinates, width, and height of

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 rectangle is inside the first or overlaps with the first, as shown in Figure 3.9. Test your program to cover all cases.

image

Here are the sample runs:

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: