Due by 8:00 AM on Monday, November 29, 1999 That is, on the Monday after Thanksgiving break.
Clarifications: In the Course class, for "sorting itself by student id," read "finding a student by ID number." So the overall program should behave just like the program from assignment 11. However, if you already added a "sort by ID number" behavior, this is also acceptable. None of the classes (Course, Student, Database) should be sub-classes of another class. There should be three independent classes. Here's one way to understand the division of responsibility between the classes. Suppose that I declared the data fields in Student private, so that methods from other classes could not get at them. The Student class should contain methods that let outsiders manipulate a Student object (e.g. ask if a student is below the ITR cutoff) by calling methods of the Student class rather than by directly accessing the data fields of the Student object. We don't make you actually declare these fields private, because you may have trouble doing this completely. But it's the idea you should aim for. So the Student class contains methods that manipulate the data fields of a student. The Course class has methods that manipulate a whole array of students (and which typically call methods of the Student class to help them). The Database class contains the main method and the menu interface for interacting with the user. There are several reasonable ways to choose a set of method for the Student or Course class. It is not necessary to exactly duplicate the set of methods I would have chosen. You just have to make a reasonable division of responsibility between the three classes. The assignment is simply to rebuild your solution to the last assignment using objects with behavior. You should center the design on two classes:
Note: As with Homework 12, you should include all three classes
(
I strongly recommend that you submit this program before break, so that you can relax over break. I'm giving you until the following Monday just case any of you need the additional flexibility in scheduling your work. |
Last modified August 28 for Fall 99 cs5 by fleck@cs.hmc.edu
This page copyright ©1997 by Joshua S. Hodas. It was built with Frontier on a Macintosh . Last rebuilt on Sun, Dec 7, 1997 at 12:32:39 PM. | |
http://www.cs.hmc.edu/~hodas/courses/cs5/week_12/homework.html | |