Aquarium Lab Series
A C D E F G H I M N P R S T V W X Y

A

AquaFish - class AquaFish.
Aquarium Lab Series: The AquaFish class defines a fish in an aquarium.
AquaFish(Aquarium) - Constructor for class AquaFish
The AquaFish constructor sets properties of the AquaFish.
AquaFish(Aquarium, Color) - Constructor for class AquaFish
The AquaFish constructor sets properties of the AquaFish.
AquaPoint - class AquaPoint.
Aquarium Lab Series: An AquaPoint object represents the x and y coordinates of a location in an aquarium.
AquaPoint(int, int) - Constructor for class AquaPoint
Constructs an AquaPoint object.
Aquarium - class Aquarium.
Aquarium Lab Series: The Aquarium class defines an Aquarium and its properties.
Aquarium(int, int) - Constructor for class Aquarium
Construct an Aquarium with user-specified size.
AquaSimApplication - class AquaSimApplication.
Aquarium Lab Series: The AquaSimApplication class contains the main function that will run the Aquarium Simulation.
AquaSimApplication() - Constructor for class AquaSimApplication
 
AquaSimGUI - class AquaSimGUI.
Aquarium Lab Series: The AquaSimGUI class provides a graphical user interface to the Aquarium Lab Series.
AquaSimGUI(Aquarium) - Constructor for class AquaSimGUI
Construct a simple graphical user interface for the Aquarium Simulation program.
AquaSimGUI(Aquarium, boolean) - Constructor for class AquaSimGUI
Construct a simple graphical user interface for the Aquarium Simulation program, with or without prompts for the number of simulation steps.
AquaSimGUI(Aquarium, boolean, boolean) - Constructor for class AquaSimGUI
Construct a graphical user interface for the Aquarium Simulation program, with or without prompts for the number of simulation steps and the number of fish.
AquaSimGUI(Aquarium, boolean, boolean, boolean) - Constructor for class AquaSimGUI
Construct a graphical user interface for the Aquarium Simulation program, with or without prompts for the number of simulation steps and the number of fish.
AquaView - class AquaView.
Aquarium Lab Series: An AquaView object provides a graphical view of AquaFish in an Aquarium.
AquaView(BufferedPanel, Aquarium) - Constructor for class AquaView
Construct an AquaView object to display a particular aquarium.
atWall() - Method in class AquaFish
Determine whether the fish is at a wall.

C

changeDir() - Method in class AquaFish
Reverse direction.
color() - Method in class AquaFish
Get fish's color.
color() - Method in class Aquarium
Determine the color of the aquarium (water color).

D

Direction - class Direction.
AP® Computer Science Marine Biology Simulation:
The Direction class encapsulates the notion of a compass direction such as North, East, South, West.
Direction() - Constructor for class Direction
Constructs a default Direction object facing North.
Direction(int) - Constructor for class Direction
Constructs a Direction object.
Direction(String) - Constructor for class Direction
Constructs a Direction object.

E

EAST - Static variable in class Direction
 
equals(Object) - Method in class Direction
Indicates whether some other Direction object is "equal to" this one.

F

FULL_CIRCLE - Static variable in class Direction
Number of degrees in compass (will not be tested on the Advanced Placement exam).

G

getAllFish() - Method in class Simulation
Get all the fish in the aquarium.
getInstance() - Static method in class RandNumGenerator
Returns a random number generator.
getNumberOfFish() - Method in class AquaSimGUI
Get the number of fish to put in the aquarium from user input.
getNumberOfSteps() - Method in class AquaSimGUI
Get the number of steps to run from user input.

H

hashCode() - Method in class Direction
Generates a hash code for this direction (will not be tested on the Advanced Placement exam).
height() - Method in class Aquarium
Determine the height of the aquarium.

I

id() - Method in class AquaFish
Get the unique identifier for this fish.
inDegrees() - Method in class Direction
Returns this direction value in degrees.

M

main(String[]) - Static method in class AquaSimApplication
This is the main function.
moveForward() - Method in class AquaFish
Move forward horizontally by random increments, staying within the aquarium.
moveLeft(int) - Method in class AquaPoint
Moves this point distance units to the left.
moveRight(int) - Method in class AquaPoint
Moves this point distance units to the right.

N

NORTH - Static variable in class Direction
 
NORTHEAST - Static variable in class Direction
 
NORTHWEST - Static variable in class Direction
 

P

pauseToView() - Method in class AquaSimGUI
Pause so user can view the display.
position() - Method in class AquaFish
Get the fish's position in the aquarium.

R

RandNumGenerator - class RandNumGenerator.
Marine Biology Simulation: The RandNumGenerator class provides a singleton java.util.Random object for random number generation.
RandNumGenerator() - Constructor for class RandNumGenerator
 
randomDirection() - Static method in class Direction
Returns a random direction.
reverse() - Method in class Direction
Returns the direction that is the reverse of this Direction object.
rise(int) - Method in class AquaPoint
Moves this point distance units up.
roundedDir(int, Direction) - Method in class Direction
Rounds this direction to the nearest "cardinal" direction (will not be tested on the Advanced Placement exam).
The choice of possible cardinal directions depends on the number of cardinal directions and the starting direction.
run(int) - Method in class Simulation
Run the Aquarium Simulation.

S

show(AquaFish[]) - Method in class AquaSimGUI
Display all the AquaFish in the fishList array.
show(AquaFish[]) - Method in class AquaView
Show the AquaFish in the Aquarium.
show(ArrayList) - Method in class AquaSimGUI
Display all the AquaFish in the fishList list.
show(ArrayList) - Method in class AquaView
Show the AquaFish in the Aquarium.
showAquarium() - Method in class AquaSimGUI
Display only the Aquarium: paint the aquarium blue to cover up old fish.
showAquarium() - Method in class AquaView
Display only the Aquarium: paint the aquarium blue to cover up old fish.
showFish(AquaFish) - Method in class AquaSimGUI
Display a single AquaFish.
showFish(AquaFish) - Method in class AquaView
Display a single AquaFish.
Simulation - class Simulation.
Aquarium Lab Series: A Simulation object controls a simulation of fish movement in an aquarium in the Aquarium Lab Series.
Simulation(Aquarium, int, AquaSimGUI) - Constructor for class Simulation
Construct a Simulation object for a particular environment.
sink(int) - Method in class AquaPoint
Moves this point distance units down.
SOUTH - Static variable in class Direction
 
SOUTHEAST - Static variable in class Direction
 
SOUTHWEST - Static variable in class Direction
 
step() - Method in class Simulation
Run through a single step of the simulation.

T

toLeft() - Method in class Direction
Returns the direction that is a quarter turn to the left of this Direction object.
toLeft(int) - Method in class Direction
Returns the direction that is deg degrees to the left of this Direction object.
toRight() - Method in class Direction
Returns the direction that is a quarter turn to the right of this Direction object.
toRight(int) - Method in class Direction
Returns the direction that is deg degrees to the right of this Direction object.
toString() - Method in class AquaPoint
Represents this point as a string.
toString() - Method in class Direction
Represents this direction as a string.

V

validLoc(int, int) - Method in class Aquarium
This function determines whether the given coordinates specify a valid location (one that exists within the bounds of the aquarium).

W

waitForStart() - Method in class AquaSimGUI
Wait for start button to be pushed.
WEST - Static variable in class Direction
 
width() - Method in class Aquarium
Determine the width of the aquarium.

X

xCoord() - Method in class AquaPoint
Returns the x coordinate of this point.

Y

yCoord() - Method in class AquaPoint
Returns the y coordinate of this point.

A C D E F G H I M N P R S T V W X Y
Aquarium Lab Series

Copyright© 2002 Alyce Brady