Created complete implementation to test if two rectangles overlap