CSC 8310 -- Programming Languages
Villanova, Summer, 1998
David Matuszek

Second Java assignment: Wator Applet

In your previous assignment, you programmed a simple predator-prey simulation, "Wator." In this assignment, you are to write an Applet that does essentially the same thing. However, your applet will have a GUI (Graphical User Interface) so that the user has control over the simulation. Try to re-use as much code as possible from the previous assignment.

Your program should display the NxN "ocean" with "sharks" and "tuna" in it, so that you can see how they move, interact, and reproduce. Provide controls so that the user can start and stop the simulation and change the various parameters.

I am not going into any detail on what your GUI should look like; that's up to you. It should, however, be reasonably self-explanatory. If I can't figure out how to use the applet, that could cost you a lot of points.

Try to keep your applet as platform-independent as possible. In particular, avoid assuming that buttons, text, etc. have any particular size, and avoid absolute positioning of controls. I will most likely not be trying your applet on a PC, so use Pure Java and avoid any Microsoft-specific extensions.

Turn in: