Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Statechart for the described coffee maker with the parallel components Cleaning Display, WaterLevel Display and Control. Use the variable and events given in

Create a Statechart for the described coffee maker with the parallel components Cleaning Display, WaterLevel Display and Control.

Use the variable and events given in the table. You can add variables and internal events. If you do, these need to be added to the table. You can create this S If the coffee machine is on, it can either make coffee (button Start) or start the cleaning process (button Clean). After each of these actions, the machine will go back to its previous state. The machine can only make coffee if it has enough water (more than minWater), it has not made 40 coffees since the last cleaning, and the water temperature temp is reached (Temp LED is off).

Making coffee is done in a sequence of steps. The first step is grinding the coffee for 15 seconds. The second step is pumping the water through the coffee for 30 seconds. The last step is that the coffee machine removes the coffee automatically, which takes another 5 seconds. When the Stop button is pressed during this process, the process is paused. The process will automatically continue after 20 seconds or when the Start button is pressed while pausing. If the process was paused once it cannot be paused again.

The machine saves the number of coffees it has made since the last cleaning. After 20 cups without cleaning the cleaning LED will turn on and be yellow. After 40 cups without cleaning the LED will turn red. If the machine is cleaned the counter will return to 0 and the LED will be turned off. The LED for the water level turns on when the water level is lower than minWater. This variable waterLevel always has the current level of water in the machine. As soon as the water level rises above minWater the LED is turned off again. The LED for the temperature is on as long as the machine is heating. Heating is needed if the variable current_temp is below temp.

image text in transcribed

NAME DESCRIPTION EXTERNAL EVENTS power clean start stop Power button was pressed Clean button was pressed Start button was pressed Stop button was pressed INTERNAL EVENTS CONDITIONS VARIABLES Current waterl level. (nat) Constant for the minimal water level needed to make coffee. (nat) Current temperature. (nat) Constant for the temperature needed to make coffee. (nat) waterMin current_temp temp NAME DESCRIPTION EXTERNAL EVENTS power clean start stop Power button was pressed Clean button was pressed Start button was pressed Stop button was pressed INTERNAL EVENTS CONDITIONS VARIABLES Current waterl level. (nat) Constant for the minimal water level needed to make coffee. (nat) Current temperature. (nat) Constant for the temperature needed to make coffee. (nat) waterMin current_temp temp

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago