pa1 - :TurtleGraphics Due:11:59pm,Thursday,September30...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment 1: Turtle Graphics Due: 11:59pm, Thursday, September 30 Overview You will use simple turtle graphics to create a three line drawing consisting of the following text, where XX should be replaced with the two letters from your own CS11 login id : CS11FXX FALL 2010 All letters will be drawn in upper case. Setup In your home directory, create a new directory called pa1 and go into that directory: mkdir ~/pa1 cd pa1 Copy over a set of base files from the public directory that will provide the drawing environment for this assignment. Notice the single dot at the end of this command. The dot means the current working directory, which is pa1 after you executed the cd command above. cp -r ~/../public/bookClasses . Instructions You should create a Java file called CS11Turtle.java under ~/pa1 . This is the only file that needs to be turned in with this assignment. This file will contain all the Java methods that will run your program. To compile your code, use the following: javac –cp ./bookClasses:. CS11Turtle.java To run your program, use the following: java –cp ./bookClasses:. CS11Turtle Your code will directly use only two classes from bookClasses : World and Turtle . World is the drawing canvas and Turtle is the pen that will do the drawing. Turtle extends SimpleTurtle , which is another class under bookClasses . You will only be dealing with methods of SimpleTurtle to do all your drawing. The Javadoc API for this class, and others in bookClasses , can be accessed by opening the file bookClasses/doc/index.html in a web browser. You should definitely take a look at the API for SimpleTurtle as all the needed drawing methods are covered there. Note on the SimpleTurtle methods turnLeft and turnRight : these methods do not make the turtle face in the left or right direction. Rather, they rotate the turtle 90 counterclockwise or clockwise, respectively.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Use t in CS pixel lette Here Reme addit
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern