/** * Class for creating a template for a simple Java program * * @author Pat Troy: troy AT uic DOT edu */ // import the library with the color information import java.awt.Color; // Note the name of the class in the following line MUST // match the name of the file. This is stored in a file // named: Template.java public class Lect914b { public static void main (String[] args) { System.out.println("Begin Java Exection"); System.out.println(""); // Create a world for the turtle Picture pict1 = new Picture(600, 480); // Create the turlte and place it in the world Turtle t = new Turtle (pict1); // draw square #1 with the turtle t.setPenWidth(5); t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); // move the turtle to the next location t.penUp(); t.forward (75); t.penDown(); // draw square #2 with the turtle t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); // move the turtle to the next location t.penUp(); t.forward (75); t.penDown(); // draw square #3 with the turtle t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); t.turn (90); t.forward (80); // move the turtle to the next location t.penUp(); t.forward (75); t.penDown(); // draw square #4 with the turtle t.forward (100); t.turn (90); t.forward (100); t.turn (90); t.forward (100); t.turn (90); t.forward (100); // display the picture pict1.show(); // Save the picture //String filename; //filename = FileChooser.pickAFile(); //System.out.println ("File: " + filename); //pict1.write (filename); System.out.println(""); System.out.println("End Java Exection"); } } // end of Template class