/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pointtest; /** * * @author jcmtiernan */ public class PointTest { /** * @param args the command line arguments */ public static void main(String[] args) { Point pt1 = new Point(); Point pt2 = new Point(3,4); //Point pt3 = new Point(9, -2); Point pt4 = new Point(3, 19, 1); //Point pt5 = new Point(-4, -6); Point pt6 = new Point(4); Point pt7 = new Point(1,2,5); String hW = new String("Hello World"); System.out.println(hW); System.out.println("This is our "+1+"st program."); System.out.println("The value of pt1 is "+pt1); System.out.println("The value of pt2 is "+pt2); //System.out.println("The value of pt3 is "+pt3); System.out.println("The value of pt4 is "+pt4); //System.out.println("The value of pt5 is "+pt5); System.out.println("The value of pt6 is "+pt6); System.out.println("The value of pt7 is "+pt7+" and quadrant is "+pt7.getQuadrant()); System.out.println("The value of pt6.x is "+pt6.getX()); System.out.println("Pt6 "+pt6+" is "+pt6.getDistanceFromOrigin()+" units from the origin"); pt6.setX(-419); // pt6.x = 19; System.out.println("The value of pt6.x is "+pt6.getX()); System.out.println("Pt6 "+pt6+" is "+pt6.getDistanceFromOrigin()+" units from the origin"); System.out.println("Pt2 "+pt2+" is "+pt2.getDistanceFromOrigin()+" units from the origin"); } }