public class Point { private int x; private int y; public Point() { x = 0; y = 0; } public Point(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } public void setX(int x) { this.x = x; } public void setY(int y) { this.y = y; } public String toString() { return x+","+y; } public static double dist(Point p1, Point p2) { return Math.sqrt(Math.pow(p1.x-p2.x, 2)+Math.pow(p1.y-p2.y, 2)); } }