problem description
Design and implement console applications in any programming language to add temperature alerts to console inputs. The application should, when
starts, get the freezing threshold, boiling threshold, and volatility values entered by the user.
generates an alert when a specific threshold is reached or exceeded.
if the temperature fluctuates near the threshold within the fluctuation value range, the alarm should not be triggered repeatedly.
alerts are defined as directions. If the previous temperature is higher than the freezing point threshold, the alarm "freeze" is triggered, and if the previous temperature is below (freeze threshold + fluctuation value), the alarm "thaw" is triggered.
is similar to "boiling" and "not boiling". If the previous temperature is below the boiling threshold, the alarm "boiling" is triggered, and if the previous temperature is higher than (boiling threshold-fluctuation value), the alarm "not boiling" is triggered.
for example, considering that the freezing threshold is set to 0, the boiling threshold is set to 100, the fluctuation value is set to 0.5,
sample 1:
is entered through the following temperature,
4.0 1.0 0.5 0.0-0.5 0.0 0.5 0.0-2.0 0.5 0.6 2.0
output will be
4.0 1.0 0.5 0.0 Frozen-0.5 0.0 0.5 0.0-2.0 0.0 0.5 0.6 thawing 2.0
sample 2:
through the following temperature input,
5.0-0.5 0.5-0.2 100 101
output will be
5.0-0.5 freezing 0.5-0.2 100 thawing boiling 101
sample 3:
through the following temperature input,
0.0 0.3 0.5 0.4 0.7
output will be
0.0 freezing 0.3 0.5 0.4 0.7 thawing