CSE8A - Homework 1 Turtle Graphics Due 5:00pm Friday...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 1: Turtle Graphics Due: 5:00pm, Friday, January 14th 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 CS8A login id: CS8WXX WINTER 2011 All letters will be drawn in upper-case. Setup In your home directory, that is your cs8wxx directory, create a new directory called hw1. Copy the folder bookClasses from your Desktop into the hw1 directory i.e. right-click on the bookClasses folder, select Copy then right-click on the hw1 folder and select Paste into Folder. Now when you double click the hw1 folder, you should see the bookClasses folder there. Instructions You should create a Java file called CSE8ATurtle.java in the hw1/bookClasses folder. This is the only file that needs to be turned in with this assignment. This file will contain the Java main method that will run your program. 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. 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. Use the code at the end of this write-up as a starting point for CSE8ATurtle.java . The code for drawing the letter 'C' in CS8WXX is provided for you. Do not change the size of 600x400 for the World. Each character should be drawn 40 pixels wide and 80 pixels high. There should be 40 pixels of space between each character and each line of text. The first
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/31/2011 for the course CSE 8a taught by Professor Kube,p during the Fall '08 term at UCSD.

Page1 / 5

CSE8A - Homework 1 Turtle Graphics Due 5:00pm Friday...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online