Here's a comprehensive answer to two problems. 

Let's start by modeling Circles: 

    class Circle {
      Point center;
      int radius;
      Circle(Point center, int radius) {
        this.center = center;
        this.radius = radius;
      }
      boolean overlaps(Circle other) {
        return (this.radius + other.radius) > this.center.distanceTo(other.center);
      }
    }

Notice they can determine if they can overlap with other Circles. 

They also rely on the following definition of Point: 

    class Point {
      int x, y;
      Point() {
        this(0, 0);
      }
      Point (int x, int y) {
        this.x = x;
        this.y = y;
      }
      double distanceTo(Point other) {
        double dx = this.x - other.x;
        double dy = this.y - other.y;
        return Math.sqrt( dx * dx + dy * dy );
      }
    }

I left out the area() method and the contains(Point point) method. They're very simple. 

Here's how we might model a Rectangle: 

    class Rectangle {
      Point location; // top left corner of the rectangle
      int width, height;
      Rectangle(Point location, int w, int h) {
        this.location = location;
        this.width = w;
        this.height = h;
      }
      boolean overlaps(Rectangle other) {
        return ! ( this.location.x + this.width <  other.location.x ||
                   this.location.y + this.height < other.location.y ||
                   this.location.x > other.location.x + other.width ||
                   this.location.y > other.location.y + other.height
                 );
      }
    }

The "overlaps with another Rectangle object or not" method is not as simple as for Circles. 

Here's a class of Utilities, in which we define static methods that rely on the instance methods defined already: 

    class Utilities {
      static boolean overlap(Circle a, Circle b) {
        return a.overlaps(b);
      }
      static boolean overlap(Rectangle a, Rectangle b) {
        return a.overlaps(b);
      }
    }

Here's an example of how we may be able to run these programs: 

    class Example {
      public static void main(String[] args) {
        Point a, b, c, d;
        a = new Point(0, 0);
        b = new Point(5, 0);
        c = new Point(0, 5);
        d = new Point(5, 5);
        Circle e = new Circle(a, 3);
        Circle f = new Circle(d, 1);
        Circle g = new Circle(d, 5);
        System.out.println(e.overlaps(f));
        System.out.println(Utilities.overlap(e, f));
        System.out.println(e.overlaps(g));
        System.out.println(Utilities.overlap(e, g));
        Rectangle u = new Rectangle(new Point(-2, -3), 2, 9);
        Rectangle v = new Rectangle(new Point(), 5, 5);
        System.out.println(u.overlaps(v));
        System.out.println(Utilities.overlap(u, v));
        Rectangle t = new Rectangle(new Point(2, 2), 4, 4);
        System.out.println(t.overlaps(v));
        System.out.println(Utilities.overlap(t, v));
        Rectangle q = new Rectangle(new Point(10, 10), 4, 4);
        System.out.println(q.overlaps(v));
        System.out.println(Utilities.overlap(q, v));

      }
    }

--