Marine Biology Simulation
Chap 4: Exploring Inheritance with the
DarterFish and CircleFish Classes
In this lab you will be working through the first half of Chapter 4 of the
Marine Biology Simulation (MBS) case study.
- Pre-Lab Reading Assignment: Read pp.
63 - 68 of Chapter 4 of the MBS case study and Sections 11.1 - 11.3 of Horstmann.
- Do Analysis Question #1 on p. 68. Write down your conclusions as part
of the lab write-up you will hand in at the end of lab.
- Read the bottom half of p. 68 and the top half of p. 69. Do Exercise
1 on p. 71. Include your drawings in your lab write-up.
- Read pp. 69 - 70. Do Exercises 2, 3, 5, and 6 on p. 71. Document
your results and your answers to the questions in the exercises in your lab
write-up.
- Do Exercise 8 on p. 77. This exercise is interesting, but it isn't
completely specified. It isn't clear from the problem description whether
a fish moves to a diagonal by actually moving forward and then to the right,
in which case
both
locations
would have to
be empty, or whether it moves directly to the diagonal location equivalent
to moving forward and then to the right, in which case only the location
on the diagonal has to be empty. Implement the latter interpretation. Generate
class documentation for your
CircleFish
class using the javadoc tool.
When you are finished, you should turn in the your results and answers to the
questions posed in the analysis questions and exercises, your drawings, and
your implementation of the CircleFish class, including the javadoc-generated
class documentation.