Lab #13  - 4/17/2003

Partnered on paper (print if you can)

For today's lab you are to create a project based on part 1 of the AP Class study.  The files are here and here and here and here and here.  (download them and put them into a folder on the desktop)

You are to modify AquaFish such that swim will take an extra argument, the argument being a reference to another AquaFish item.  In this new swim you are to make sure that the place you move to is NOT taken up by the other AquaFish.  (so check the other AquaFish's myPosition when you're moving, and make sure you don't go onto it).  In addition, you need to add another variable to the AquaFish, that will keep track of how many times your aquafish has bumped into another (and you need to increment this in your swim method when you bump into the other fish) and an accessor that will return the number of fishbumps there have been.  Modify the aquamain such that there are two fishes, and you are using the modified swim method for both fishes and at the end, also print out the fish bump counts.