/* * 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; import javax.swing.JOptionPane; /** * * @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 pt6 = new Point(4); PlainRobot r2D2 = new PlainRobot(22, pt2); // String hW = new String("Hello World"); JOptionPane.showMessageDialog(null, r2D2); 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 pt6 is "+pt6); 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"); } }