Project #7 CMSC 131
Due:  Friday 4/28 at 11:00PM Object-Oriented Programming I
Type of Project: Closed Spring 2006

Fish Club


Click here to view a video of the Fish Club application running.


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:



To practice the Model-View-Controller design pattern; practice reading API's described with JavaDoc; practice exception handling; practice using the ArrayList class; practice using arrays.



Fish Club is a simulation of a very primitive "Ecosystem." 

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?

You will be writing portions of the Model, Fish, and Plant classes. We have distributed skeleton versions of these classes to your CVS repositories -- look in the package called "fishPond".

Note that the main method which runs the project is in the Controller class.




See the JavaDoc for a complete description of the project.   This information is also duplicated in the source code distribution that you have received.  A few items of great importance:


Java 5.0 Compliance

If Eclipse is giving you errors when you are trying to use the ArrayList class, first be sure that you have done the appropriate import:  "import java.util.ArrayList;"

If that doesn't fix the problem, it could be that Eclipse is trying to compile your project using the older standard of Java.  Right-click your project folder, Select "properties", "Java compiler", "Configure workspace settings". If it isn't already selected, choose "5.0". Hopefully that will take care of the problem!


Style Hint

We have provided a  lot of built-in named constants.  For example, the two-dimensional array that keeps track of where all the rocks are uses the values "Model.ROCK" and "Model.WATER" to keep track of where there are rocks and where there is just water.  Even though you can easily see that these constants represent the values "true" and "false", it is a HUGE mistake to simply use "true" and "false" in your code when differentiating between rock and water.  That defeats the entire purpose of using symbolic constants:  the symbolic constants make the code more readable, and also facilitate possible changes to the project design at some later time.  You will lose style points if you don't use symbolic constants properly!




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:  If you would like to submit a solution to the "Challenge Problem", then 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!

WARNING:  If you submit a project with a "Challenge Problem" that will not compile, your entire project will not be graded!

Web Accessibility