66public class TurtleObjects
77{
88 public MultiTurtleWindow mtw = new MultiTurtleWindow ();
9- public static void main (String [] args )
10- {
11- new TurtleObjects ();
12- }
139 public TurtleObjects ()
1410 {
1511 showSomeTurtles ();
1612 }
17- //
13+ public static void main (String [] args )
14+ {
15+ new TurtleObjects ();
16+ }
1817 private void showSomeTurtles ()
1918 {
19+ // Call the makeSpeedyTurtle method --#2
2020 makeSpeedyTurtle ();
21+ // Call the makeSlowTurtle method --#4
2122 makeSlowTurtle ();
23+ // Call the makeCrazyTurtle method --#6
2224 makeCrazyTurtle ();
2325 }
26+ //
27+ // NOTE: Teacher to point out the mtw.addAndShowTurtle method
28+ // NOTE: Teacher to ask 'what are the steps of the drawTriangle method'?
29+ // Create the makeSpeedyTurtle method --#1.0
2430 private void makeSpeedyTurtle ()
2531 {
32+ // Create a new speedyTurtle instance
2633 Turtle speedyTurtle = new Turtle ();
34+ // Set the speed of your speedyTurtle to the fastest possible
2735 speedyTurtle .setSpeed (10 );
36+ // Add your speedyTurtle to your MultiTurtleWindow
2837 mtw .addAndShowTurtle (speedyTurtle );
38+ // Have your speedyTurtle draw a triangle with 100 pixel sides
2939 speedyTurtle .drawTriangle (100 );
40+ // End of makeSpeedyTurtle method --#1.1
3041 }
42+ //
43+ // NOTE: Teacher to ask why this turtle is slower than the first one
44+ // NOTE: Teacher to ask why the two turtles start at the same spot
45+ // Create the makeSlowTurtle method --#3.0
3146 private void makeSlowTurtle ()
3247 {
48+ // Create a new slowTurtle instance
3349 Turtle slowTurtle = new Turtle ();
50+ // Add your slowTurtle to your MultiTurtleWindow
3451 mtw .addAndShowTurtle (slowTurtle );
52+ // Have your slowTurtle draw a upside down triangle with 50 pixel sides
3553 slowTurtle .drawTriangle (-50 );
54+ // End of makeSlowTurtle method --#3.1
3655 }
56+ //
57+ // NOTE: Teacher to ask why is this turtle faster than the second one
58+ // NOTE: Teacher to ask why does this turtle 'start' in a different location
59+ // NOTE: Teacher to ask why does this turtle show up AFTER the other two HINT: mtw.addTurtle method
60+ // NOTE: Teacher to ask what does the drawLightning method do?
61+ // Create the makeCrazyTurtle method --#5.0
3762 private void makeCrazyTurtle ()
3863 {
64+ // Create a new crazyTurtle instance
3965 Turtle crazyTurtle = new Turtle ();
66+ // Add your crazyTurtle to your MultiTurtleWindow
4067 mtw .addTurtle (crazyTurtle );
68+ // Have your crazyTurtle draw a 55 pixel long lightning bolt
4169 crazyTurtle .drawLightning (55 );
70+ // End of makeCrazyTurtle method --#5.1
4271 }
43- }
72+ }
0 commit comments