Marine Biology Case Study Problems

  1. Change fish class so that boys, who have odd ids() are blue and girls who have even ids() are pink. Make any new births reflect this change.

  2. Create a fish that will try to go straight. If it can move forward then it will randomly pick from right or left move (if possible)

  3. Create a shark class the derives fron the fish class. The shark should be black and only move on a diagonal. The shark should have shark children.

  4. Change the shark class so that it lands on a fish it eats it.

  5. Create a circle fish class that will always move to the right if it can (or it won't move)

  6. Create a flying fish class. This fish will find an empty location (at random) somehere in the environment and move there.

  7. Extend the slow fish class so that the fish will die if it doesn't move for 5 straight moves. Change the code so that the fish will not die because of the probOfDying.