| Project #7 | CMSC 131 |
| Due: Wednesday 11/30 at 11:00PM | Object-Oriented Programming I |
| Type of Project: Closed | Fall 2005 |
Fish Club
Click here to see FISH CLUB in action!
The first rule of Fish Club is: You do not talk about Fish Club.
The second rule of Fish Club is: You DO NOT talk about Fish Club. (After all, it's a closed project...)
Other rules:
Each fish travels in one direction until it encounters a rock, at which point it turns randomly to move in a direction where there is no rock. Plants and rocks don't move.
If one fish runs into another fish, the larger one eats the smaller one, accumulating it's mass.
If a fish passes over a plant, it eats part of the plant -- the fish gets bigger; the plant gets smaller (or disappears if it was already pretty small.)
Over time, fish shrink (unless they eat something) and plants grow (unless something eats them).
If a fish gets too big, it will explode, creating 4 to 8 smaller fish. The combined mass of the smaller fish is equal to the mass of the original.
If a plant gets too big, it will explode creating 2 to 9 smaller plants. The combined mass of the smaller plants is equal to the mass of the original.
If the size of a fish or a plant reaches zero, it is gone forever.
Objective
To practice the Model-View-Controller design pattern; practice exception handling; practice using the ArrayList class; practice using arrays.
Overview
Fish Club is a simulation of a very primitive "Ecosystem." If you haven't already, please run the demo!
If you watch Fish Club in "slow motion", you can see some interesting interactions and patterns occurring among the pond's inhabitants. If you slide the speed slider all the way to the right (maximum speed) and watch patiently, you may observe some interesting long-term patterns in the populations and locations of the fish and plants. The interactions can be very complex! It's fun to try to formulate "theorems" for what sorts of situations will yield an "ecosystem" that can survive for a very long time. Can you think of any scenarios where you can PROVE that the fish will never die?
Specifications
See the JavaDoc. This information is also duplicated in the source code distribution that you have received. A few items of great importance:
Corrections
A few errors have been found in the project description. It is too late to re-distribute the source-code, so I have put a notice on the class wiki describing the errors. Please check this entry on the wiki from time to time -- if other errors are discovered, I will list them there.
Requirements
Grading
Your grade will be computed as follows:
Challenge Problem
The challenge problem is to "make some cool modification(s) to the Fish Club project." I may demonstrate some of the best ones to your classmates. I might even have students vote on which ones are the best (best entries will receive some kind of non-class-related PRIZE, provided by Fawzi!)
IMPORTANT: Submitting the Challenge problem will be different this time because you might actually decide to modify some of the code that was provided. If you want to do the challenge problem, carefully COPY (do not MOVE) all of the files that are in your "fishPond" package into a "challengeProblem" package. Make sure you haven't accidentally deleted anything from your fishPond package! Now you have two completely separate versions of the project that can be developed independently. Your regular project submission will be considered to be whatever is in the "fishPond" package ONLY!