INTRODUCTION TO PROGRAMMING IN C++

    The Aquarium Lab Series    

Alyce Brady
Kalamazoo College


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 C++. The labs were developed to support an objects-early curriculum in which students learn to read interfaces, construct objects, and invoke member functions immediately after learning how to use primitive types. Students learn how to use basic control structures (if statements, for loops) and vectors in the context of writing client code, before learning how to implement classes and write member functions.

The labs in this series were inspired by the Advanced Placement Computer Science 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, and calling functions.

Some of the classes used in the Aquarium Lab Series are the same as, or very similar to, those in the Marine Biology Case Study (for example, RandGen and Display). Others are considerably different from the case study. WARNING: the similarity in names (particularly the AquaFish class) may create confusion for some students who use both the Aquarium Lab Series and the Marine Biology Case Study. Others will have no difficulty, particularly if teachers point out the differences between the two.

The Aquarium Lab Series consists of two full-length labs, which need approximately two hours to complete, several mini-labs, which can generally be completed in less than an hour (sometimes considerably less), and several supplementary assignments.

Starting Code:

Mini-Lab: Reading Interfaces and Writing Client Code
    (recently modified, the previous version is still available: Reading Interfaces and Writing Client Code)

Tasks include:

Pre-Lab Assignment: Experimenting with the CMU Graphics package and
Full-length Lab: Displaying the Aquarium Using Graphics

Tasks include:

Mini-Lab: If Statements

Tasks include:

Mini-Lab: For Loops

Tasks include:

Supplementary Assignment: A Few More Enhancements

Tasks include:

Related Full-length Lab: Creating a Histogram

Tasks include:

Mini-Lab: Vectors

Tasks include:

Related Supplementary Assignment: Adding Vectors to the Histogram Project

Tasks include:

Supplementary Assignment: Even More Enhancements

Tasks include:


*This lab series was inspired by the Advanced Placement Computer Science Marine Biology Simulation Case Study.

+The CMU Graphics Library was created by the Carnegie Mellon University School of Computer Science and is used in their introductory programming courses. It is available from Mark Stehlik's Advanced Placement page.