// This is a client program that constructs two points, translates their // coordinates, and reports the distance between them. public class PointClient2 { public static void main(String[] args) { Point p1 = new Point(); p1.x = 3; p1.y = 5; Point p2 = new Point(); p2.x = 12; p2.y = 4; p1.translate(-1, -2); p2.translate(6, 8); System.out.println(p1.distance(p2)); System.out.println(p2.distance(p1)); } }