You may work with a partner on this assignment.
For this assignment, you will write a Fish class that is much like the Die and Target classes you have written before. One Fish instance will store enough information to draw a fish in a DrawingBoard. That is, each instance should have data members that keep track of the color and position of the fish, as well as the direction it is facing (left or right). The Fish class should also have a draw method with the interface
public void draw( DrawingBoard board )
You may choose for yourself what other methods to give your Fish class.
You will also write a FishTester class with a main method that does the following:
Generates ten fish with random position (x and y between 0 and 500), random direction (left or right), and random color (red, blue, green, or yellow) and stores them in an array of Fish.
Draws the ten fish on a DrawingBoard.
Waits two seconds (see the pause method of the javabook class Clock).
Redraws the ten fish in black.
Start early, have fun, and keep in touch.