COMP 304B Object-Oriented Software Design -- Assignment 5

COMP 304B Object-Oriented Software Design - Assignment 5
  Due date: Monday March 19th, 2007 before 23:55

 

Practical information

The assignment

In this assignment, you will implement the Command Pattern for the physical simulation system you worked on in assignment 1.

Most of the simulator code is provided (simulator.zip). This includes a command line tool that can parse commands you type in. Consider this tool as the invoker for your system. The syntax for the commands is as follows:

Your task is to implement the Command pattern so that the command line tool (invoker) will be able to execute actions on the simulator (receiver). You will need to implement the following commands:

  1. CreateMass
  2. DeleteMass
  3. PushMass
  4. StepSimulation

In addition, your implementation should allow you to undo any number of actions executed on the simulation. Unfortunately, the ability to undo steps in the simulator has not been implemented. You'll have to implement that too. Most likely, undo will be a command itself. However, you shouldn't be able to undo an undo command.


Alexandre Denault, March 2007