// This class is a client of the Point1 class, that // is, it creates Point1 objects and uses them. // // Java can run this file as a program since it has // a public static void main(String[] args) method. public class PointClient3 { public static void main(String[] args) { Point3 p1 = new Point3(); p1.x = 5; p1.y = 10; Point3 p2 = new Point3(); p2.x = 3; p2.y = -8; // The Point3 objects know how to handle // translate() themselves, so we ask them // to do it. p1.translate(2, 3); p2.translate(4, 8); System.out.println("p1 = " + p1.x + ", " + p1.y); System.out.println("p2 = " + p2.x + ", " + p2.y); } }