Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 1 Review-Spring 2007: Turtle Initial

Back to Midterm Exam 1 Review-Spring 2007

Questions? Answers? Comments?

//makes a W

public class WTurtle {

public static void main(String [] args) {

//FileChooser.setMediaPath("C:/cs1316/MediaSources/");
Picture canvas = new Picture(600,600);
Turtle jenny = new Turtle(50,50, canvas);

jenny.penDown();
jenny.moveTo(40,80);
jenny.moveTo(30,20);
jenny.penUp();
jenny.moveTo(50,50);
jenny.penDown();
jenny.moveTo(60,80);
jenny.moveTo(70,20);




canvas.show();
}

}
//makes a P and looks cool
public class MylastNameInitialP {

public static void main(String [] args) {

//FileChooser.setMediaPath("C:/cs1316/MediaSources/");
Picture canvas = new Picture(600,600);
Turtle jenny = new Turtle(canvas);
Picture lilTurtle = new Picture(FileChooser.getMediaPath("Turtle.jpg"));

for (int i=0; i =40; i++)
{
if (i 20)
{jenny.turn(20);}
jenny.drop(lilTurtle.scale(0.5));

}
jenny.turn(230);
jenny.forward(40);
jenny.turn(-90);
jenny.forward(150);


canvas.show();
}

}

//Is this too much or would this work?


// Makes an N
public class MyTurtlePicture {
public static void main(String [] args) {
Picture canvas = new Picture(600,600);
Turtle jenny = new Turtle(canvas);
jenny.forward(40);
jenny.turn(135);
jenny.forward(56);
jenny.turn(-135);
jenny.forward(40);
canvas.show();
}
} -Student527


public class TurtleInitial {
  
  public static void main(String [] args) {
    
    
    Picture canvas = new Picture(600,600);
    Turtle jenny = new Turtle(canvas);
 jenny.forward(50);
 jenny.turn(180);
 jenny.forward(100);
 jenny.turn(180);
 jenny.forward(50);
 jenny.turn(90);
 jenny.forward(50);
 jenny.turn(90);
 jenny.forward(50);
 jenny.turn(180);
 jenny.forward(100);
 
    canvas.show();
  }
  
}
Makes an H! -Student521



Link to this Page