Web Workshop on the APCS Marine Biology Case Study
Joe Kmoch and Chris Nevison
Copyright Chris Nevison, Computer Science Department, Colgate University,
Hamilton, NY, 13346, July, 2000. This material may be reproduced
without permission for face-to-face teaching purposes only. This
material may not be reproduced or used for any commercial purpose.
This copyright notice must appear on any copies made.
This is a modified version of the introductory page for the
web workshop developed by
Joe Kmoch and Chris Nevison describing the purpose of each workshop
unit and its associated programming projects.
The assignments are
appropriate for use throughout the APCS A and AB curricula.
The web workshop web site is
http://cs.colgate.edu/APCSWeb/MBCS/WebWorkshop/WebWorkshopIndex.html
Unit 1a: Early Assignments Using
Position
and RandGen
Unit 1: Using an Abstract Type and Random
Walks
Demonstrates how materials from the MBCS may be used
very early in the APCS A course.
- Using an abstract type (Position)
- Random Walk (one-dimensional)
- Functions using RandGen and Position to produce a two-dimensional
random walk
Unit 2: Aquarium
Purpose: Learn about simple classes. Use and modify classes.
- Graphics and Direction
- Using Vectors
Unit 3: Testing and Experimenting with a
Program
Purpose: Developing effective test plans.
- Developing a Test Script for the MBCS
- Testing Alternate Programs
Unit 4: Modifying the Fish Class
Purpose: Add a data member, change an existing member
function, add a new member function.
Unit 5: Freedom of Movement
Purpose Modify classes to support hexagonal
cells in the environment.
- Model fish movement using a hexagonal grid.
Unit 6: Aging, Breeding, and Dying
Purpose: Modify the MBCS so that the fish population
is no longer static -- fish are created and removed dynamically.
- Add age characteristic and probability of breeding and dying to
Fish
.
- Modify
Environment
so that it can remove a fish that
dies.
- Add an Act member function to
Fish
that is
responsible for aging, breeding, moving, and dying.
- Modify
Display
to indicate age of fish.
Unit 7: Creating a New Class, Species
Purpose: Develop a new class for the MBCS
application.
- Create a new
Species
class that encapsulates the
probability of breeding and dying for a species of fish.
- Modify the
Fish
class to know its species.
- Create a fish log for recording the changes in the species
populations over time.
Unit 8: Storing the Fish Population
Purpose: To explore a different data structure for
representing fish in the environment. (APCS A)
- Store Fish in an
apvector
Unit 9: Storing the Fish Population, Sparse
Matrix
Purpose: To explore a different data structure for
representing fish in the environment. (APCS AB)
- Sparse Two-Dimensional Data Structure using Linked Lists
Unit 10: Binary Search Tree and Hash Table
Purpose: To study different data structures for
representing fish in the environment and compare approaches. (APCS AB)
- Binary Search Tree
- Hash Table
- Analysis and Timing
Joe Kmoch has made
a series of six worksheets that supplement the Marine Biology Case Study.
These are also
available from the Web Workshop web site.