public class Point{
private int x;
private int y;
public void setPoint(int x,int y){
this.x = x;
this.y = y;
}
public void setPoint(Point other){
this.x = other.x;
this.y = other.y;
}
public void setX(int x){
this.x = x;
}
public void setY(int y){
this.y = y;
}
public int getX(){
return x;
}
public int getY(){
return y;
}
public int distanceTo(Point other){
int _x = Math.abs(this.x - other.x);
int _y = Math.abs(this.y - other.y);
return Math.sqrt(_x*_x+_y*_y);
}
public String convertToString(){
String result = "Point[x="+x+",y="+y+"]";
return result;
}
}