Program design
The design document you submit should consist of
- A title, author, date and other preliminaries. (As usual with
assessed work, please use your Registration number, not your name.)
- An introduction,
which explains what the program is for, and gives a high-level account
of how it works.
- A structure,
typically describing briefly the set of classes you intend to write.
You should explain the idea behind each class without going into much
detail at this stage. You should also explain why it makes sense to
have each of the classes you describe.
- A section giving more detail on each class. Here, you will describe
the important variables and methods. You don't need to describe every
method, just the important ones. You might give pseudocode to describe
the algorithms you intend to implement. Include enough information so
that the reader can clearly see how information flows in your program.
Your description should make clear what are the important arguments for
each method, and what it returns.
Your set of classes should be loosely coupled, but each class should
show high cohesion. Coupling is a measure of the
interdependence between classes. If every object has a reference to
every other object, then there is high coupling, and this is
undesirable because there's potentially too much information flow
between objects. Low coupling is desirable: it means that objects work
more independently of each other. Low coupling minimizes the "ripple
effect" where changes in one class cause necessity for changes in other
classes. Cohesion is a measure of strength of the association
of variables and methods within a class. High cohesion is desirable
because it means the class does one job well. Low cohesion is bad
because it indicates that there are elements in the class which have
little to do with each other. Modules whose elements are strongly and
genuinely related to each other are desired. Each method should also be
highly cohesive. Most methods have only one function to perform. Don't
add 'extra' instructions into methods that cause it to perform more
than one function.
Important points about submission:
- Please submit your design electronically, using the procedure
described on the main web age.
- Your design should be in PDF or HTML. These are open standards.
MS-Word is not an open standard and should be avoided for distributing
documents.
- The marking scheme will focus on quality, not quantity.
Please make every sentence meaningful. Make every word count. Style hints. Use diagrams if they will help
your explanation.
Mark Ryan, 16 October 2004.