import java.lang.Math; public class Point { public float x,y; public Point() { this(0.0f,0.0f); } public Point(float x, float y) { this.x = x; this.y = y; } public float dist(Point b) { return (float)Math.sqrt(Math.pow(b.x-x,2.0)+Math.pow(b.y-y,2.0)); } public float manhattan(Point b) { return (float)(Math.abs(x-b.x)+Math.abs(y-b.y)); } }