COMP 304B Object-Oriented Software Design -- Assignment 5\\\ Due date: Friday April 11, 2003 before 23:55

COMP 304B Object-Oriented Software Design - Assignment 5
  Due date: Friday April 11, 2003 before 23:55

 

[printable version of this document (pdf)]| [COMP 304B Home]


Practical information

The assignment

In this assignment you will use UML Class Diagrams, Pseudocode and UML Sequence Diagrams to describe a simple design based on the Visitor Pattern.

The design uses the Formula class structure of the Spreadsheet design found in the solution of assignment 2.

Your design removes the evaluate methods from all classes and puts it in an appropriate Evaluate visitor. A PrettyPrint visitor is also required. It makes use of the __str__ methods which are assumed to not recursively call their children (in case of operators, for example).

Your assignment solution should contain:

  1. A Class Diagram depicting all relevant classes, their attributes and methods, as well as all relationships between the classes.

    Pseudocode (in sticky notes) must be provided for all important methods (for example, for accept()).

  2. Pseudocode for a Use Case (scenario) in which program, and instance of the Program class has access to the tree corresponding to the formula $A$12*2+10. The program first evaluates and then prettyprints this formula.
  3. A Sequence Diagram depicting the above Use Case.

The Class Diagram, Pseudocode, and Sequence Diagram must be consistent.

Add short explanations where necessary.




Translated from TEX by TTH, version 3.02 (minor customizations by HV). On 2 Apr 2003, 19:01.