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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started