Extending the Graphical Marine Biology Case Study
This programming project is based on the graphical version of the Marine Biology Case Study.*
Implement a mouse in a maze. You may use the following files to get started:
Display
class from the graphical version of
the Marine Biology Case Study
(display.h and
display.cpp)
Neighborhood
, Position
, and
RandGen
classes from the Marine Biology Case Study
Maze
and Mouse
classes are very
similar to the Environment
and Fish
classes,
respectively, in the Marine Biology Simulation case study. You should
also implement a graphical Display
class that is based on
the graphical Display
class from the case study. You
should be able to use the Neighborhood
,
Position
, and RandGen
classes without
modification. You will need to modify utils.cpp
in an
extremely trivial way. You do not need simulate.cpp
and
simulate.h
at all.
Start by implementing only those functions needed to construct and
display a maze and a mouse. Either comment out the functions that you
do not yet need in the Maze
and
Mouse
header files or provide empty implementations for
them in the .cpp files. Most of your work for this phase will be
modifying the CMU graphics version of the Display
class to
display the mouse (and cheese) in a maze rather than fish in an
aquarium.
Once you have the display working, you should work on implementing the
other functions of Maze
and Mouse
and then
un-comment the extra code in main.cpp
.
*This assignment is an extension of the Advanced Placement Computer Science Marine Biology Simulation Case Study, available from the College Board. It uses Alyce Brady's graphical version of the case study (which, in turn, uses the CMU Graphics Package available from Mark Stehlik's web site at Carnegie Mellon University), but could be modified to work with other graphical interfaces.