I got an assignment this week.But i dont understand it clearly. Here is the question
"A rectangle in x-y space can be defined with the x-y coordinates of the lower left and upper right corners. Write a programe that determines if the two rectangles overlap. Here user inputs the corners of the rectangle a total of 4 x-y pairs. Print out whether the rectangles overlap.
A sample run should be as follows
rectangle 1
Enter the upper x coordinate for rectangle1: 100
Enter the upper y coordinate for rectangle1: 200
Enter the lower x coordinate for rectangle1: 300
Enter the lower y coordinate for rectangle1: 400
rectangle 2
Enter the upper x coordinate for rectangle2: 200
Enter the upper y coordinate for rectangle2: 250
Enter the lower x coordinate for rectangle2: 400
Enter the lower y coordinate for rectangle2: 400
There is an overlap in the two rectangles. "
I have to submit on thursday so please help me on this