public class PointMain3 { public static void main(String[] args) { // create two Point objects Point p1 = new Point(1, 3); System.out.println(p1.getX() + ", " + p1.getY()); // 1, 3 Point p2 = new Point(4, 6); System.out.println(p2.getX() + ", " + p2.getY()); // 4, 6 // report the distance between p1 and p2 System.out.println("distance between p1 and p2: " + p1.distance(p2)); // compute p1's distance from the origin System.out.println("p1's distance from (0, 0): " + p1.distanceFromOrigin()); // compute p2's distance from the origin } }