Question: Write a program: prompts the user to enter the x,y position, width, and height of a rectangle (and reads integers representing those values). prompts the

Write a program:

  1. prompts the user to enter the x,y position, width, and height of a rectangle (and reads integers representing those values).
  2. prompts the user to enter the x,y position, width, and height of another rectangle (and reads integers representing those values).
  3. prints a message indicating whether or not the two rectangles intersect as below.
  4. prints a message indicating whether one rectangle contains the other as below.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!