Lab3 - CSE115 Lab 3 Introduction Fall 2009 In this lab you...

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

View Full Document Right Arrow Icon
CSE115 Lab 3 Fall 2009 Introduction In this lab you will use the Java you have learned in lecture to write a small program. You will apply what you know about the composition relationship, methods, and the manipulation of variables. Preparatory tasks 1. Log in 2. Start Eclipse 3. Switch to the CVS Repository Exploring perspective 4. Check out the FA09-CSE115-Lab3 project from the Labs repository 5. Switch to the DrJava perspective Lab Tasks 1. Change the definition of the lab3.EcoOne class so that it is in a composition relationship with the example1.Terrarium class. Define a void method named „addCaterpillar‟ which adds a new example1.Caterpillar to the composed Terrarium, and starts the Caterpillar. Also define a void method named addAnt ‟ which adds a new example1.Ant to the composed Terrarium, and starts the Ant. 2. Change the definition of the lab3.EcoTwo class so that it is in two composition relationships with the example1.Terrarium class. (Hint: this means that there
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2011 for the course CSE 115 taught by Professor Decker during the Fall '08 term at SUNY Buffalo.

Page1 / 2

Lab3 - CSE115 Lab 3 Introduction Fall 2009 In this lab 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