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

COMP 304B Object-Oriented Software Design - Assignment 4

 

Practical information

Problem statement

In this assignment, you will design a Statechart model specifying the reactive behaviour of a Microwave.

You will first model the reactive behaviour of the microwave as a UML StateChart. You are free to do so using any UML drawing tool. You will then implement this statechart yourself using Python amd the provided Microwave framework (microwave.zip). Note that your implementation should clearly reflect your statechart architecture and that the corrector should easily be able to see states and transitions.

Behaviour requirements

  1. A Microwave starts off as idle and closed. In this state, it displays the current time.
  2. The up and down arrows can used to specify the cooking time. The two right-most group of arrows allow you to increment and decrement time in seconds. The two left-most group of arrows allow you to increment and decrement time in minutes.
  3. The cooking time is displayed if an up arrow is pressed. If the cancel button is pressed, the microwave becomes idle again.
  4. If the cooking time is greater than 0, the start button can be used to activate the microwave.
  5. Once activated, the cooking time will reduce at a normal speed.
  6. The cancel button can be pressed to pause the cooking (thus deactivate the microwave). Pressing the cancel a second time cancels the cooking and returns the microwave to an idle state.
  7. The open/close button can be pressed to open the microwave door.
  8. Pressing the button again closes the door.
  9. While the microwave door is opened, the microwave cannot be activated (start cooking).
  10. However, the open button can be pressed while cooking (microwave activated). This pauses the microwave (as in pressing the cancel button). However, the microwave cannot continue until the door is closed.

Final Result

Your final results should contain both your UML statechart diagram and your Python implementation. In addition to correctness, the T.A. will evaluated the following two criteria's :


Alexandre DenaultFebruary 2007.