The Aquarium Lab Series is a series of mixed-length laboratory exercises that provide students with an opportunity to put introductory programming concepts to work immediately. Thus, the series is meant to be used very early in an introductory course on programming in Java.
The labs in this series were inspired by the Java-based AP® Marine Biology Simulation Case Study, available from the College Board. These labs, however, are meant to be used even earlier in the school year, as students learn about constructing objects, using if statements and for loops, calling functions, and defining their own classes.
Downloading the Aquarium Lab Series:
Download the zip file containing the starting code files for the Aquarium Lab Series by right-clicking or shift-clicking on the following link: AquariumLabSeries.zip.
When you unzip this file, it will create a folder called
that contains the instructions for the labs, a folder called
and a folder containing documentation. The
contains three classes you will viewing and modifying, a sub-folder with other
"black-box classes" needed by the program (that you do not need to
study), and a graphics library.
NOTE: Teachers may wish to download the starting source files in advance,
create a project or makefile, and then provide these materials to students as
a unit. (If you happen to use CodeWarrior Learning Edition 3 , you can
use the CodeWarrior project file in the
Labs in the Aquarium Lab Series
The Aquarium Lab Series consists of several mini-labs, which are meant to be short enough to complete in a single class period, and a longer lab, which may need a longer time-block or several class periods to complete.
Mini-Lab: Reading Specifications and Constructing Objects
Mini-Lab: If Statements
Mini-Lab: For Loops
Mini-Lab: Java Array Lists
Full-Length Lab: Implementing Classes
AquaFishclass to provide methods that allow fish to ascend and descend in the aquarium.
mainmethod to the
Simulationclass by implementing the constructor and a
stepmethod that encapsulates the behavior for a single step through the simulation.