package test;
public class Point {
double x ,y,Circle;
double x ,y,Circle;
public Point() {
this.x=1.0;
this.y=2.0;
this.Circle=3.0;
}
public Point(double x, double y, double circle) {
this.x = x;
this.y = y;
Circle = circle;
}
public boolean overlap(Point p) {
return Math.sqrt((p.x-this.x)*(p.x-this.x)+(p.y-this.y)*(p.y-this.y))<(p.Circle+this.Circle);
}
this.x=1.0;
this.y=2.0;
this.Circle=3.0;
}
public Point(double x, double y, double circle) {
this.x = x;
this.y = y;
Circle = circle;
}
public boolean overlap(Point p) {
return Math.sqrt((p.x-this.x)*(p.x-this.x)+(p.y-this.y)*(p.y-this.y))<(p.Circle+this.Circle);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Point c1=new Point();
Point c2=new Point(3.0,4.0,5.0);
System.out.println(c1.overlap(c2));
}
// TODO Auto-generated method stub
Point c1=new Point();
Point c2=new Point(3.0,4.0,5.0);
System.out.println(c1.overlap(c2));
}
}