Class Simulation
java.lang.Object
|
+--Simulation
- public class Simulation
- extends java.lang.Object
Aquarium Lab Series:
A Simulation object controls a simulation of fish movement in
an aquarium in the Aquarium Lab Series.
- Version:
- 10 July 2002
- See Also:
Aquarium
,
AquaFish
,
AquaSimGUI
Method Summary |
AquaFish[] |
getAllFish()
Get all the fish in the aquarium. |
void |
run(int numSteps)
Run the Aquarium Simulation. |
void |
step()
Run through a single step of the simulation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Simulation
public Simulation(Aquarium aquarium,
int numFish,
AquaSimGUI gui)
- Construct a Simulation object for a particular environment.
- Parameters:
aquarium
- the aquarium in which fish will swimnumFish
- the number of fish to put in the aquariumgui
- graphical interface that displays the aquarium
run
public void run(int numSteps)
- Run the Aquarium Simulation.
- Parameters:
numSteps
- the number of simulation steps to run
step
public void step()
- Run through a single step of the simulation.
getAllFish
public AquaFish[] getAllFish()
- Get all the fish in the aquarium.
Copyright© 2002 Alyce Brady