|
AP® Computer Science Marine Biology Simulation | |||||
PREV NEXT | FRAMES NO FRAMES |
BoundedEnv
class models a bounded, two-dimensional,
grid-like environment containing locatable objects.other
for ordering.
DarterFish
class represents a fish in the Marine
Biology Simulation that darts forward two spaces if it can, moves
forward one space if it can't move two, and reverses direction
(without moving) if it cannot move forward.Debug
class supports conditional printing of
debugging messages.Direction
class encapsulates the notion of a compass
direction such as North, East, South, West.Direction
object facing North.
Direction
object.
Direction
object.
EnvDisplay
interface describes the methods needed
by all EnvDisplay
objects.Environment
provides an interface for a two-dimensional,
grid-like environment containing locatable objects.Direction
object
is "equal to" this one.
Location
object is
"equal to" this one.
Fish
object represents a fish in the Marine Biology
Simulation.Locatable
is an interface that guarantees that an object
knows its location and returns it when the location
method is called.Location
object represents the row and column of a
location in a two-dimensional grid.Location
object.
MBSGUI
class provides a main method for a version
of the AP Computer Science Marine Biology Simulation with a graphical
user interface.RandNumGenerator
class provides a singleton
java.util.Random
object for random number generation.Direction
object.
SimpleMBSDemo1
class provides a main method that creates
a simulation of a number of fish swimming in a bounded environment.SimpleMBSDemo2
class provides a main method that creates
a simulation of a number of fish swimming in a bounded environment.Simulation
object controls a simulation of fish
movement in an Environment
.Simulation
object for a particular
environment.
SlowFish
class represents a fish in the Marine Biology
Simulation that moves very slowly.SquareEnvironment
is an abstract class that implements
only the navigational methods in the Environment
interface.SquareEnvironment
object in which cells
have four adjacent neighbors -- those with which they share sides.
SquareEnvironment
object in which cells
have four or eight adjacent neighbors, depending on the value
of the includeDiagonalNeighbors
parameter.
Direction
object.
deg
degrees
to the left of this Direction
object.
Direction
object.
deg
degrees
to the right of this Direction
object.
UnboundedEnv
class models an unbounded, two-dimensional,
grid-like environment containing locatable objects.
|
AP® Computer Science Marine Biology Simulation | |||||
PREV NEXT | FRAMES NO FRAMES |