code: public boolean intersects(Shape shape) {
          if(shape instanceof Rectangle) {
              Rectangle other = (Rectangle)shape;
      		if ((x > (other.x + other.width)) || ((x + width) < other.x)) {
      			return false;
      		}
      		if ((y > (other.y + other.height)) || ((y + height) < other.y)) {
      			return false;
      		}
              return true;
          }
          else if(shape instanceof Circle) {
              return intersects((Circle)shape);
          }
          else {
              return super.intersects(shape);
          }
  	}
docs: Check if this box touches another
  
  @param shape The other shape to check against
  @return True if the rectangles touch