Faculty of Engineering

SEG 2105 Assignment 6

For details of other assignments and general rules, see this page.

This is an individual assignment. You may not work together.

For deadline see the syllabus.

The following asks you to create state diagrams. You must use Umple with the option 'GraphViz State Diagram' set. Hand in both the Umple code and the resulting diagrams.

Question 1. Draw a state diagram for a car window controller as follows.

The following are the events that can occur when controlling a window:

Question 2. Create a simulation as follows.

Create a main method and other necessary code that runs a simulation of your answer to question 1. Create a trace of the output. Hand in the main method and the trace of output.

Note that you need to call a method that will start and stop the motor in the forward and reverse directions at the appropriate times. In the simulation, this would just print out what has happened to the motor.