// CSE 142, Autumn 2010, Marty Stepp // This "client" program uses our Point class. import java.awt.*; // for Graphics public class PointClient { public static void main(String[] args) { // create two Point objects Point p1 = new Point(); p1.x = 50; p1.y = 27; Point p2 = new Point(); p2.x = 98; p2.y = 53; System.out.println(p1.x + ", " + p1.y); // 50, 27 System.out.println(p2.x + ", " + p2.y); // 98, 52 // move p2 and then print it p2.x += 2; p2.y++; System.out.println(p2.x + ", " + p2.y); // 100, 53 // draw the two points on a DrawingPanel DrawingPanel panel = new DrawingPanel(200, 200); Graphics g = panel.getGraphics(); p1.draw(g); p2.draw(g); } }