Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Questionnaire | Schedule | Submit

Saint Louis University

Computer Science 146
Object-Oriented Practicum

Michael Goldwasser

Fall 2014

Dept. of Math & Computer Science

Assignment 05

An Alternative Design

Overview

Topic: An Alternative Design
Due: 11:59pm Monday, October 20
Related Reading: Pages 36 through 42 in case study

Please make sure you adhere to the policies on academic integrity.


Table of Contents


Overview

The reading describes more detail about the interactions between various classes. In this assignment, we will focus on exercises #2 and #3 on page 42. These ask that you consider and implement a major modification to the source code that will effect multiple files. Specifically, it asks that you add new functionality to the Neighborhood class that allows it to return a uniformly random position from within the neighborhood, and to then modify the Fish class to take advantage of this new behavior.

In previous lecture notes, we provided a formal sequence diagrams that described the actions related to one step of the simulation using the original (reference) code base. To aid you in this assignment, we have created a new version of the sequence diagram that reflects the desired change. (Note well that it is now the neighborhood that interacts with the RandGen object (not the fish.)


Technical Details

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 modification3


Your task

You are to make the desired changes to the source code, and to submit a prose document that discusses the changes. In particular, we wish for you to provide us with a guide that explains which parts of which files you changed to enact the new design. You are then to answer question #2 on page 42, where you discuss the relative advantages and disadvantages of the old and new design.


Submitting your project

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 "modification3" directory, execute:

make clean
zip -o modification3.zip *
That will create a new file named modification3.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.


Michael Goldwasser
CSCI 146, Fall 2014
Last modified: Monday, 07 October 2013
Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Questionnaire | Schedule | Submit