/* * 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.JFrame; 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); Point pt3 = new Point(5,5); Point pt4 = new Point(4,8); Point pt5 = new Point(9); PlainRobot r2D2 = new PlainRobot(22, pt2); PlainRobot robbie = new PlainRobot(22, pt6); PlainRobot c3PO = new PlainRobot(22, pt1); SmallRobot wallE = new SmallRobot(138,pt3, 15, 10.0); TinyRobot T1000 = new TinyRobot( "Tea", 1000); PlainRobot johnny5 = new PlainRobot(); TinyRobot guiltySpark = new TinyRobot("gS"); wallE.setKindOfLoco(LOCOMOTION.ROLLERS); MovingThing roomba = new MovingThing(2,LOCOMOTION.WHEELS); MovingThing darryl = new MovingThing(13,"feet"); // String hW = new String("Hello World"); JOptionPane.showMessageDialog(null, r2D2); System.out.println("The value of robbie is "+robbie); System.out.println("The value of wallE is "+wallE); System.out.println("The value of T1000 is "+T1000); System.out.println("The value of johnny5 is "+johnny5); System.out.println("The value of guiltySpark is "+guiltySpark); System.out.println("MovingThing roomba "+roomba); System.out.println("MovingThing darryl "+darryl); DrawSmiley panel = new DrawSmiley(); JFrame application = new JFrame(); application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); application.add( panel ); application.setSize( 250, 280 ); application.setVisible( true ); /* 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"); } }