Q1) Design behavioral specs by using state diagram for coffee machine controller given below.
State events
State actions
State variables
Draw diagram
Machine operates ah hourly interval and display (no minutes) using 24hr display. Default display is current time but it changes to brew display when Brew button is pressed. Each time Hr button is pressed, the time advances by 1 (current or brew time according to current display).
The machine is always set to brew, only brew time can be changed. When brewing, a red light is on, and it shuts off after 1 hour.