Lab2 - Introduction In this lab you will use the Java you...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 3

Lab2 - Introduction In this lab you will use the Java you...

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