// This is a client program that constructs two points and translates their // coordinates using a static method. public class PointClient1 { 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; translate(p1, -1, -2); translate(p2, 6, 8); } public static void translate(Point p, int dx, int dy) { p.x = p.x + dx; p.y = p.y + dy; } }