This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Introduction In this lab you will use the Java you have learned in lecture to write a small program. Preparatory tasks 1. Log in 2. Start Eclipse 3. Switch to the CVS Repository Exploring perspective 4. Check out the FA09-CSE115-Lab2 project from the Labs repository 5. Switch to the DrJava perspective Lab Tasks A. Do the following in the DrJava interactions pane, declaring variables as needed. Once you have finished, you must copy and paste the contents of the interactions pane into the DrJavaInteractions.txt file contained in the lab2 package of the src folder. BE SURE TO COPY AND PASTE YOUR WORK BEFORE YOU CLOSE THE TERRARIUM WINDOW! Create one example1.Terrarium object, put three example1.Caterpillar objects and four example1.Ant objects inside it. Make two of the caterpillars and threes of the ants move by calling their respective “start()” methods. Let the caterpillars and ants move around for a few seconds, then call the “stop()” method on all the caterpillar and ant objects you started earlier, but only on...
View Full Document
- Fall '08
- interactions pane