// Page 208-209 public class Point { private int x; private int y; public Point() // default constructor { x = 0; y = 0; } public Point(int px, int py) { x = px; y = py; } public double distance(Point p) { return(Math.sqrt((p.x-x)*(p.x-x)+(p.y-y)*(p.y-y))); } }