Using the Turtle Class in BlueJ

Some of your homework assignments will require you to use a Turtle class previously created by Wu (see page 81). This page gives instructions on how to use this Turtle class in BlueJ. You should only need to follow these instructions once.

  1. Download the Galapagos2009.zip file either from this page or directly from the published.
  2. Unzip the file to a separate folder (on a Windows machine, right-click on the file and select Extract All; on a Mac, just double-click the file). This file contains the source code for the Turtle program as well as documentation. Check the readme for more information.
  3. Open up the BlueJ program.
  4. You need to tell the BlueJ program where to find the Turtle class you just downloaded. Select "Preferences..." from the "Tools" menu to bring up the preferences window (it's under the "BlueJ" menu on the Mac).
  5. Select the "Libraries" tab, then click the "Add" button.
  6. Browse to the folder you extracted from the zip file, and select the galapagos.jar file. Note that your computer might not show the .jar extension.
  7. Hit the "OK" button (and hit "OK" on pop-up).
  8. Now quit and restart BlueJ.
  9. You will now be able to import galapagos.* and create Turtle objects, as described in the book (demonstrated below). Remember to compile your code before you run it!

Further details on the Turtle class can be found in the doc folder of the zip file. Open up the index.html file to view the documentation and list of methods.