// CSE 142, Spring 2010, Marty Stepp // A "client" program that uses our new class of Point objects. import java.awt.*; // for Graphics public class PointClient { public static void main(String[] args) { // create three Point objects and set their coordinates Point p1 = new Point(); p1.x = 17; p1.y = 53; Point p2 = new Point(); p2.x = 102; p2.y = 99; Point p3 = new Point(); p3.x = 250; p3.y = 29; // print the location of each Point System.out.println("p1 is (" + p1.x + ", " + p1.y + ")"); System.out.println("p2 is (" + p2.x + ", " + p2.y + ")"); System.out.println("p3 is (" + p3.x + ", " + p3.y + ")"); // draw the Points on the screen DrawingPanel panel = new DrawingPanel(500, 400); Graphics g = panel.getGraphics(); p1.draw(g); p2.draw(g); p3.draw(g); } }