Saint Louis University |
Computer Science 146
|
Dept. of Math & Computer Science |
Topic: More Refactoring
Due:
11:59pm Monday, March 24
Related Reading: Pages 36 through 42 in case study
Please make sure you adhere to the policies on academic integrity.
We continue with our redesign of the internal flow of control for our
simulation steps. To avoid confusion, we will revert back to the
original partII code base as our starting point for this assignment.
Our new focus becomes implementing what is labeled as "Modification 4"
on page 42 of our case study document.
The updated UML sequence diagram to reflect the new design is as
follows:
We wish for you to start with a clean copy of the "partII" sourcecode. If you are working on turing, execute the following command from within whatever top-level directory you use for this course.
cp -Rp /Public/goldwasser/146/partII modification4
You are to make the desired changes to the source code, and to submit both the sourcecode and a prose document that gives a brief guide to explain what changes you made. I suggest you keep a log of those changes as you go, rather than trying to recall them after-the-fact.
We ask that you also do your best to clean up any remnants of the old design that become deprecated with this change. For example, in the original design, the Fish class has its own EmptyNeighbors method. By shifting that responsibility to a new method in the Environment class, it would be good to remove the EmptyNeighbors method entirely from the Fish class. Please do any other such cleanup that is possible. Also, it would be good to minimize the use of #include statements for the new design, to only those files where they are necessary.
Please ensure that your final result compiles and executes properly.
Your assignment should be submitted electronically (details on the submission process).
Submit the prose document as you normally would.
Given the large scope of modifications made to the multiple versions of the source code, we would like you to create a single "zip" file for each of the modification version. If working on turing, you should execute the following commands. First, from within your "modification4" directory, execute:
make clean zip -o modification4.zip *That will create a new file named modification4.zip that is an archive of your directory (the call to make clean intentionally removes the various compiled files, leaving only the original source code). That zip file is the one that I would like for you to submit online.