A C D F I K M N P R S T U 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.
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.
atBottom() - Method in class AquaFish
This function decides whether the fish is at (or below) the bottom.
atLeftWall() - Method in class AquaFish
This function decides whether the fish is at (or beyond) the left wall.
atRightWall() - Method in class AquaFish
This function decides whether the fish is at (or beyond) the right wall.
atSurface() - Method in class AquaFish
This function decides whether the fish is at (or above) the surface.
atWall() - Method in class AquaFish
This function decides whether the fish is at (or beyond) a wall.

C

changeDir() - Method in class AquaFish
This function changes the direction of the fish.
color() - Method in class AquaFish
Get the color of the fish.

D

Display - class Display.
Aquarium Lab Series: The Display class contains methods for displaying AquaFish in an Aquarium.
Display(Aquarium) - Constructor for class Display
Construct a Display Object to display AquaFish in an Aquarium

F

facingLeft() - Method in class AquaFish
This function decides whether the fish is facing Left.
facingRight() - Method in class AquaFish
This function decides whether the fish is facing Right.
facingWall() - Method in class AquaFish
This function decides whether a fish is facing a wall.
FishAnimation - class FishAnimation.
Aquarium Lab Series: The FishAnimation class contains the main function that will run the Aquarium Project.
FishAnimation() - Constructor for class FishAnimation
 
fishHeight() - Method in class AquaFish
Get the height of the fish.
fishLength() - Method in class AquaFish
Get the length of the fish.

I

id() - Method in class AquaFish
Get the unique identifier for this fish.
inAquarium() - Method in class AquaFish
This function decides whether the fish is in an aquarium.

K

Keyboard - class Keyboard.
The Keyboard class, which simplifies input from a keyboard, is based on James Slack's Programming and Problem Solving with Java, published by Brooks/Cole.
Keyboard() - Constructor for class Keyboard
 

M

main(String[]) - Static method in class FishAnimation
 
move() - Method in class AquaFish
This function allows the fish to move horizontally and vertically by random increments.

N

nextInt(int) - Method in class TempRandom
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

P

pause() - Method in class Display
Pause.

R

readInt() - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as an int.
readInt(int) - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as an int.
readInt(String) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as an int.
readInt(String, int) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as an int.
readInt(String, int, int) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as an int.
readInt(String, int, int, int) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as an int.
readLong() - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as a long.
readLong(long) - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as a long.
readLong(String) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a long.
readLong(String, int, int) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a long.
readLong(String, int, int, long) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a long.
readLong(String, long) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a long.
readShort() - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as a short.
readShort(short) - Static method in class Keyboard
Waits for the user to type a number, and then returns that number as a short.
readShort(String) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a short.
readShort(String, int, int) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a short.
readShort(String, int, int, short) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a short.
readShort(String, short) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a number, and then returns that number as a short.
readString() - Static method in class Keyboard
Waits for the user to type a line, and then returns all characters the user typed as a string.
readString(String) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a line, and then returns all characters the user typed as a string.
readString(String, String) - Static method in class Keyboard
Displays the given prompt, and then waits for the user to type a line, and then returns all characters the user typed as a string.
run(int) - Method in class Simulation
Run the simulation for the specified number of steps.

S

setDelay(int) - Method in class Display
Set the delay time used by show (length of pause between steps).
setTitle(String) - Method in class Display
Set the title to appear in the Title Bar of the "window".
show(Vector) - Method in class Display
Show a Vector of AquaFish in the Aquarium and pause.
showAquarium() - Method in class Display
Display the Aquarium: paint the aquarium blue to cover up old fish.
showFish(AquaFish) - Method in class Display
Display a single AquaFish.
Simulation - class Simulation.
Aquarium Lab Series: The Simulation class defines a simulation of fish in an Aquarium.
Simulation(Aquarium, Display, int) - Constructor for class Simulation
Construct and initialize a Simulation object.
step() - Method in class Simulation
Runs through one step of the simulation (without display).

T

TempRandom - class TempRandom.
A temporary version of java.util.Random that provides the RandInt (int n) method; should not be necessary because a similar function has been implemented since JDK 1.2, according to Sun's documentation for Random.
TempRandom() - Constructor for class TempRandom
 
toString() - Method in class AquaFish
This function is provided primarily for debugging purposes.

U

undoMove() - Method in class AquaFish
This function allows the fish to return to its last position (can only back up once).

X

xCoord() - Method in class AquaFish
Get the x coordinate of the fish's position in the aquarium.

Y

yCoord() - Method in class AquaFish
Get the y coordinate of the fish's position in the aquarium.

A C D F I K M N P R S T U X Y