You must generate the design for this project. The design represents the set of classes and their responsibilities and collaborations that you code to implement the program. Do not short change yourself by spending too little time formulating your design. Too many programmers start writing code before they understand how the program is supposed to work and before creating a good design that supports the requirements.
Use inheritance and polymorphism to the fullest extent possible. A well-defined abstract class at the head of a multi-level inheritance hierarchy can make your programming task immensely easier. It will also reduce the amount of code that you have to generate.
You will submit your design (UML diagram and pseudo-code) on paper in lecture on the design due date.
Note: if you intend to work with a partner you must announce this on your design submission. No teams will be allowed to be formed after this time.
You design has two components. The first is a UML diagram that shows the classes that you will use. This diagram follows the standard format for UML diagrams. There is a chart summarizing UML available from Rational Corp. here. The essential points for your work are as follows:
String is most likely in this category) you do not have to
show the association from every class. To reduce diagram clutter just
add a notation at the bottom of the diagram that all classes use the class.
You can use xfig or Rational Rose on the CS department Unix
systems. You can also use any other drawing program that you may be
familiar with. You will have to hand in a hardcopy of the UML diagram.
(To use Rational Rose
see
information that Prof. Heliotis has made available. There are also
a number of tutorials and references for Rational Rose off the
CS 4 tools and documentation
page.
On the design due date you will also submit a document that contains a brief description of each class in your design. Your descripton must state what role the class plays in your design and how it interacts with other classes ion the system. You must also provide a pseudo-code description of the operation of every non-trivial method in each class. This should be a description of what each of the methods will do written in a structured English format. It is not Java code but rather a description of what the program code will do. Indent the pseudo-code where appropriate based on the control structures that you plan to use.
All non-trivial methods must be documented. Do not confuse trivial with simple. Most of the methods will probably appear to be rather simple, i.e. easy to understand. Trivial means short. Less than five lines of code. Any method that will be more than five or so lines of code, or have more than a single control statement (if, while, switch) must have pseudo-code documentation.
After you finish your design and begin writing the source code copy your pseudo-code into comment blocks within the class's Java file. This will probably give you most of what you need for the required code commentary.
Your design document must also include a computer generated drawing of what your GUI will look like. The best thing to do would be to write a prototype of your GUI (a GUI prototype displays all the components of your GUI but does not connect any actions to the components) and the print out a screenshot. If you are short on time you may hand in a computer generated drawing of what you think your GUI will look like.
Your instructor will collect your design documentation in lecture on the design due date.