5 * $Id: TestPoint.java,v 1.7 2008/03/13 19:30:23 rmh3093 Exp $
8 * $Log: TestPoint.java,v $
9 * Revision 1.7 2008/03/13 19:30:23 rmh3093
10 * add test case for getDistance()
12 * Revision 1.6 2008/03/13 19:10:56 rmh3093
15 * Revision 1.5 2006/12/08 18:46:59 vcss232
22 * This class tests the Point class. There are errors in
28 public class TestPoint
{
29 private static Point p1
, p2
;
31 public static void main( String args
[] ) {
33 // Create a point to play with and verify the X and Y coordinates
35 p1
= new Point( 2, 3 );
36 System
.out
.println( "x = " + p1
.getX() );
37 System
.out
.println( "y = " + p1
.getY() );
39 // Create a second point and then use setPoint() to initialize
40 // the X and Y coordinates of the second point.
44 System
.out
.println( "x = " + p2
.getX() );
45 System
.out
.println( "y = " + p2
.getY() );
50 System
.out
.println( "x = " + p2
.getX() );
51 System
.out
.println( "y = " + p2
.getY() );
54 System
.out
.println( "d = " + p2
.getDistance(p1
) );