// simple client class that demonstrates the use of a custom MyPoint // class whose instances keep track of how many times they have been // translated. public class MyPointClient { public static void main(String[] args) { MyPoint p1 = new MyPoint(); MyPoint p2 = new MyPoint(3, 8); p1.translate(4, 5); p1.translate(2, 6); p2.translate(18, 4); System.out.println("p1 = " + p1); System.out.println("p2 = " + p2); System.out.println("p1 translate count = " + p1.getTranslateCount()); System.out.println("p2 translate count = " + p2.getTranslateCount()); } }