COMP 304B Object-Oriented Software Design -- Assignment 4
COMP 304B Object-Oriented Software Design - Assignment 4
Practical information
- Due date: March 12th, 2007, before 23:55
- Team size == 1 (Singleton)
- Your submission must be in the form of a simple HTML file (index.html) with explicit references to all submitted files as well as inline inclusion of images. See the general assignments page for an index.html template.
- The submission medium is WebCT.
- To get insight into the assignment workload, provide the number of hours you spent on this assignment.
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
- A Microwave starts off as idle and closed. In this state, it displays the current time.
- 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.
- The cooking time is displayed if an up arrow is pressed. If the cancel button is pressed, the microwave
becomes idle again.
- If the cooking time is greater than 0, the start button can be used to activate the microwave.
- Once activated, the cooking time will reduce at a normal speed.
- 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.
- The open/close button can be pressed to open the microwave door.
- Pressing the button again closes the door.
- While the microwave door is opened, the microwave cannot be activated (start cooking).
- 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 :
- Does your Microwave behave correctly (bugs?)
- Does your Microwave implementation correspond to your UML statechart?
Alexandre DenaultFebruary 2007.