Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A major portion of your grade (35%) will be based on your program style. If you write your code in the OO style practiced in this course, you should do very well on this aspect of the assignment. The remaining 15% of your grade is based on your documentation, particularly your javadoc comments for classes and methods.

The Student class includes:

...

Delegation Model Programming vs. Imperative Programming

This assignment will require that you write code that is a mixture of delegation model programming, where one delegates from one object to another to achieve the desired processing, and imperative programming where a defined control flow is set up, such as with if-else or {while}} loop constructs and the objects are processed by following this constructed control flow and processing information extracted from the relevant objects.    This mixture is how you can expect a real world program to be constructed -- the world isn't so clean that only one paradigm can totally rule in any situation.  

The best approach is to default to a delegation mode, looking to create your processing algorithms as a delegation chain from one object to the next.    However, you will discover that the nature of certain objects, the BiList in particular, will force you into an imperative mode where you will have to use the BiList's iterators in conjunction with conditionals and loops.    Effeciency concerns (see below) will also play a role in which programming style you are using at any given moment. 

Remember the mantra of delegation model programming:  If your process depends on the type of an object, then delegate to that object.   Visitors are expressly designed for exactly this sort of type-dependent delegation model processing.

Use imperative programming sparingly -- only if and when you absolutely need it!  

...

Form of Event Commands

Your program executes a loop that repeatedly reads input from an input "process" that returns Command objects. The input process (provided by our supporting framework) reads a series of event description commands, one to a line, either from the console or from a file. The input process converts a stream of characters to Command objects which are passed to your program.

...