Problem Solving Assignment 2


Due: Tuesday, Jan 13, midnight (11:59pm)


This is not a pair assignment. Every person in the class should complete it themselves and turn it in with bundle (see bottom of page). NEXT WEEK (PSA3) we'll work using pair programming. However, you may feel free to talk to others in the class if you get stuck.

Note: There is NO INTERVIEW PROCESS for this PSA. Interviews start on PSA3.

This homework requires skills from Chapter 2 and Chapter 3 up to page 59.


Set up

Problem

  1. Write a program (in the Dr. Java definitions pane) in a file called DrawMyName.java. Save this file in your PSA2/bookClasses folder. DO NOT SAVE THIS IN bookClasses on the Desktop! You must be working in the PSA2/bookClasses folder!

    This program will use Turtles to draw your first name on the screen. Click here to get a sample code that you can copy and paste to get started. The program will do the following in the following order:

    You are required to create at least one turtle and to draw your name on the screen. However, feel free to be creative. You can use multiple turtles or have multiple colors if you want.

    Note: If your first name has more than 8 letters, you can just draw the first 8 letters.

Details.

You MUST name your files as indicated in the problem descriptions for the turnin program to work. YOU MUST INCLUDE YOUR NAME, LOGIN, PID, and EMAIL in a comment at the top of all of your files. In this case at the top of DrawMyName.java

How to turnin your homework electronically

Important: You are allowed to use your home computer to solve these problems but the programs MUST run on the lab machines. Running a different version of Java on your home computer than the version in the lab could potentially cause issues. The safest thing to do is to test it on the lab machine before turn-in as the lab machines will be used to grade your homeworks.

When you are ready to turn in your homework, first open a terminal window by right clicking on the empty area of your computer's desktop (have to use lab computers or remotely connect from your home computer) and select "Open a New Terminal". Then, run bundlePSA2 from your PSA2/bookClasses directory. The session should look like this:

-bash-2.05b$ cd ~/PSA2/bookClasses
-bash-2.05b$ bundlePSA2
Good; all required files are present:

        DrawMyName.java

Do you want to go ahead and turnin these files? [y/n]y
OK.  Proceeding.


Performing turnin of approx. XXXX bytes 
Copying to /home/linux/ieng6/cs8f/turnin.dest/cs8wxx.PSA2
.
Done.
Total bytes written: XXXX 
Please check to be sure that's reasonable.
Turnin successful.

If you want to make changes after you've turned in your homework, make the changes and run bundlePSA2 again. The program will warn you that a "previously turned-in file exists" and ask if "you wish to over-write this existing file". Respond in the affirmative by typing y and pressing the Enter key.