title: Java: rectangle Overlap
body: <p>I need some help regarding an assignment that I've received through school. I've been stuck on a specific part of the assignment, detecting whether a rectangle is overlapping another. I tried to create an If-statement for the cases when the two rectangles aren't overlapping, but the teacher said that it would be easier doing the opposite and gave me a picture of seven scenarios that I should create If-statements for. I'm not looking for an complete answer, just maybe a solution to one of the cases so I get an idea of how I should think, or maybe just a tip. Thanks!</p>
  <p>here is the picture,</p>
  <p><a href="https://i.stack.imgur.com/x9c2i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x9c2i.png" alt="enter image description here" /></a></p>
  <p>The program language is Java. The rectangles have the dimensions: dx(width), dy(height). They each have coordinates: x, y. Which are located on the top left of each rectangle.</p>