Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop the pseudo-code that you could use for a heater that does the following:

ID: 3623731 • Letter: D

Question

Develop the pseudo-code that you could use for a heater that does the following:
Your heater controller will always monitor the room temperature of your apartment. It will also monitor a control switch called ON/OFF and either DO NOTHING (when OFF) or HEAT (when ON). When the heater is turned ON, it will compare the room temperature to the heater desired temperature setting. If the room temperature is at least 2° lower than the desired temperature, the heater will TURN ON. It will stay ON until the room temperature is at least 2° higher than the desired temperature and then TURN OFF again.

Explanation / Answer

please rate - thanks

everyone does pseudocode differently, so hope this is good

loop:    heater off

       yes: no nothing

       no:   get room temperature

                  get heater desired temperature

                   room temperature + 2 < = desired temperature

                               yes: turn on heater

                               no:   room temperature -2 >= desired temperature

                                            yes: turn off heater

                                            no: do nothing

go back to loop