Marine Biology Simulation |
This file contains links to a number of diagrams that illustrate object interactions in the Java-based Advanced Placement® Computer Science Marine Biology Simulation case study.
In these object diagrams, each object of a class is represented by a rectangle containing the name of the object's class, an icon representing the object, and a list of its methods. The diagrams also use arrows between method names to indicate object interactions, and include an outline summary of the algorithmic behavior being illustrated.
Most diagrams show only the public methods for the objects, although a few
include the protected methods for objects of the Fish
class. It
is easy to distinguish between public and protected methods: public methods,
which represent an object's interface to other objects, project beyond the edge
of the rectangle representing the object. Protected methods, on the other hand,
are encapsulated inside the object rectangle.
The following object diagrams are available:
step
method. (pdf version)
step
method, representing the behavior of each timestep in the simulation.
(pdf version)act
and move
methods, illustrating the behavior of a single fish in a single timestep.
(To see these methods separately, see act
only and move
only.)
(pdf versions of act
and move
,
act
only, and move
only)
nextLocation
method) (pdf version)emptyNeighbors
method) (pdf version)
act
method
(pdf version)
move
method (unchanged)
(pdf version)breed
method (new) (pdf
version)die
method (new) (pdf
version)
move
and nextLocation
methods (pdf
version)nextLocation
method (pdf version)
*AP and Advanced Placement are registered trademarks of the College Entrance Examination Board.