Class DiseaseSimulation
java.lang.Object
Simulation
DiseaseSimulation
public class DiseaseSimulation
- extends Simulation
DiseaseSimulation -- using the Simulation class
- Author:
- Mark Guzdial, Barb Ericson
Method Summary |
static void |
main(String[] args)
Main for testing |
void |
setUp()
Initialize the world for the simulation. |
String |
toString()
create an information string with the number infected |
Methods inherited from class Simulation |
add, closeFile, endStep, getAgents, getOutput, getWorld, openFile, openFrames, remove, run, run |
DiseaseSimulation
public DiseaseSimulation()
setUp
public void setUp()
- Initialize the world for the simulation.
Fill the world with 60 persons, one sick
- Overrides:
setUp
in class Simulation
toString
public String toString()
- create an information string with the number infected
- Overrides:
toString
in class Simulation
- Returns:
- the number infected as a string
main
public static void main(String[] args)
- Main for testing