Question: Write a program using C# that prompts for the X, Y integer coordinates of two rectangles in the 2D plane and determines if the rectangles
Write a program using C# that prompts for the X, Y integer coordinates of two rectangles in the 2D plane and determines if the rectangles overlap.
Examples: Enter the X, Y coordinates for one corner of rectangle 1: 0, 0
Enter the X, Y coordinates for another corner of rectangle 1: 5, 15
Enter the X, Y coordinates for one corner of rectangle 2: 1, 1
Enter the X, Y coordinates for another corner of rectangle 2: 6, 12 The rectangles overlap in the 2D plane.
Enter the X, Y coordinates for one corner of rectangle 1: 0, 0
Enter the X, Y coordinates for another corner of rectangle 1: 5, 15
Enter the X, Y coordinates for one corner of rectangle 2: 65, 30
Enter the X, Y coordinates for another corner of rectangle 2: 100, 56
The rectangles do not overlap in the 2D plane.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
