BioSimulation Applet


[Description]   [Instructions]   [Java Source]   [Dave's Home Page]   [Next Demo]


You are using a browser that is not enabled to view Java applets. In order to view this applet, you need a Java-enabled browser, such as Netscape 2.0 for Windows 95/NT/UNIX, or Netscape 3.0 for the Macintosh. Just so you don't feel too left out, however, here's a snapshot what the applet looks like when it's running.


[Top]   [Description]   [Instructions]   [Java Source]   [Dave's Home Page]   [Next Demo]


Description

BioSimulation is a very simple simulator of a biological model. The user may add organisms and predators, and observe what happens as they interact on the screen. Despite the deceptive simplicity of this program, it demonstrates how object-oriented languages such as Java can be used to model real-world systems.


[Top]   [Description]   [Instructions]   [Java Source]   [Dave's Home Page]   [Next Demo]


Instructions

  1. Adding individual organisms: First, make sure that "Add Organisms" is selected in the choice menu at the top of the applet. Then, choose a type of organism from the menu and then click on the simulation area to add new organisms. The simulator currently only supports two types of organisms: Predators and plain old generic Organisms. The generic Organisms show up in cyan, and the Predators show up in red.
  2. Adding a group of organisms: You can add new organisms 5 at a time by clicking the "Add Random" button. This will add 5 organisms of the currently selected type, randomly distributed about the simulation area.
  3. Removing organisms: First, make sure that "Remove Organisms" is selected in the choice menu at the top of the applet. Then, click on any organism to remove it from the simulation.
  4. Controlling the Simulation: Start the simulation running with the Start button; stop it with -- you guessed it, the Stop button. The Reset button resets the simulation, removing all organisms and starting over from scratch.


[Top]   [Description]   [Instructions]   [Java Source]   [Dave's Home Page]   [Next Demo]


Java Source Files

default package;

BioSimulation.java

package biosim;

EcoEvent.java
Ecosystem.java
Organism.java
Predator.java
XYPair.java


[Top]   [Description]   [Instructions]   [Java Source]   [Dave's Home Page]   [Next Demo]