Question: In regards to the pseudocode below: Does your program flow in a logical order? What variables are implied by your design? Do they account for

In regards to the pseudocode below:

Does your program flow in a logical order? What variables are implied by your design? Do they account for everything in the problem statement? What sections of the code might make sense to put in main()? What pieces of the code would make sense in a function or functions?

Pseudocode: Read PRESET_TIME to start brewing coffee when the machine is stopped

If want to set machineTime

Press ON button twice

Set the HH:MM time

Press ON one more time

Else when the time is already set for the machine

Do nothing

ENDIF;

Add water and coffee to the machine

IF ON button is pressed

Start bowling water and mixing with coffee; this is brewing coffee mechanism

IF machine is out of water:

Automatic sensor stops brewing coffee by machine

ENDIF;

IF coffee temperature is more than specified:

Heating sensor stops heating water

ENDIF;

Send the mix to glass container;

ENDIF;

IF OFF button is pressed

IF Machine is ON

Shut down the coffee brewing process

Display current time

ELSE

Do Nothing, just display current time

ENDIF;

ENDIF;

IF PROGRAM button is pressed

Wait for PRESET_TIME and then again start coffee machine.

IF coffee temperature is more than specified:

Heating sensor stops heating water

ENDIF;

ENDIF;

END;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!