/** * A simple Turtle drawing program * * @author Pat Troy: troy AT uic DOT edu */ // add import statements to get items from Java libraries import java.awt.Color; // Note the name of the class in the following line MUST // match the name of the file. public class Lect0908c { public static void main (String[] args) { System.out.println("Begin Java Exection"); System.out.println(""); // put your Java Program here // Step 1. Create the world World w; World w2, w3, w4, w5; w = new World (); // Step 2. create the turtle Turtle t; t = new Turtle (w); Turtle t2; t2 = new Turtle (50, 150, w); // step 3. Move the turtle t.setPenWidth(5); t2.setPenWidth(15); t.forward (); t.turnRight(); t.forward (300); t.turn (230); t.forward (30); t.turn (230); t.setPenColor(Color.PINK); t.forward (300); t.turnRight(); t.forward (300); t.penUp(); // lift the pen so no line is drawn t.forward (30); t.penDown(); // set the pend back down t.forward (30); t2.forward (75); t2.turn(120); t2.forward (30); t2.turn(-90); t2.forward (400); // Final step, Show the world the turtle lives in w.show(); System.out.println(""); System.out.println("End Java Exection"); } } // end of Template class