Last modified: January 27 2008 09:59:15 PM
In this first lab assignment you will:
- set up your account so that you can work with DrJava for the rest of the semester
- learn some basic Unix commands that you will need throughout the semester
- start DrJava and use the interactions pane to write some Java expressions and statements
- save your interactions history from DrJava
- submit your work using the electronic submission program
You will do all of these things in the DrJava Interactions pane and once again save the history. Your history does not have to be perfect, but all of the exercises must eventually be completed successfully. You should refer to Chapter 3 of the text for more information about the turtle and the things it can do.
- Create a World. (If you are having trouble doing this, follow the directions on page 14 of the book about setting up the Interactions pane classpath.)
- Create a Turtle to put in the world you just created.
- Give the Turtle your name.
- Issue the Turtle at least ten commands to draw something on the screen. You must use each of the following commands at least once in the 10 commands. Feel free to issue more than ten commands to see what you can draw with the Turtle. This exercise is designed to be free form and give you practice for the more structured exercises in 5 & 6. Be creative. The more you play with the turtle at this stage, the easier exercises 5 & 6 will be.
Use the turtle to draw a star (5 or 6 sided - you chose)
In honor of Valentine's Day, use the turtle to draw cupid's arrow (as fancy or plain as you'd like).
Save Your Interactions History
When you have completed all the exercises, you will need to save the interactions history to show that you have completed this lab. This means that you will need to do all the exercises at one time in order to have them all saved on the same interactions history. Alternatively, you will need to save what you have done temporarily and the next time you start DrJava, load up your history as a script and use the "Execute" Button that will appear on the right of the navigation pane to execute all of the instructions you have saved in your script and continue from where you left off.
To save the interactions history, place your mouse in the Interactions pane and then right click. Choose the option that says "Save Interactions History..." You can select "No" when asked if you want to edit before proceeding. Then, save the file in your module 2 directory that you created in module 1. You should name the file
You will now have a file called
Module2.hist. Submit this file by going back out to the Unix prompt and typing:
Your lab submission is due no later than 11:59:59 pm on February 15th
. Remember, no late labs will be accepted
Lab authored by Adrienne Decker