Aging, Breeding, Dying programmign assignment AP-A

Some ecologists from upstate New York would like to adapt the fish simulation to study the growth over time of populations of fish, given limited resources. They would like to study what happens when fish breed and die over time. They plan to use the simulation model as a means of studying fish populations in lakes in New York State.

The ecologists want to make the following assumptions about the fish:

In addition the ecologists would like to be able to distinguish among fish of different ages in the display:

Make a copy of your Movement folder and call it LiveBreedDie. Use the edited files to start the assignment. If you did not complete the previous "Freedom of Movement" assignment, download the files again into a folder called LiveBreddDie (see "Freedom of Movement" assignment for original files.)

Assignment

  1. Add an age characteristic to the fish.
  2. Add a probabilty of dying and a probability of breeding to the fish.
  3. Create a new Environment member function RemoveFish that removes a Fish at a given Position, passed as a parameter, from the Environment.
  4. Create a new Fish member function Act that will be responsible for all of the actions of a fish on each step.
  5. Modify the Fish member function ShowMe so that fish of breeding age or older appear different from younger fish.
  6. Use or modify calls to DebugPrint appropriately, so that they can be used to check the correct functioning of the modified program.
  7. Modify the Simulation member function Step so that it calls Act instead of Move.
  8. Draw a new set of 'Class Diagrams' that show the new functions and the collaborations among the classes.

What to turn in