Due to COVID-19 pandemic which has caused high surge of patients at hospital, patients who diagnosed COVID-19 with no symptoms or mild symptoms are instructed to home quarantine and self-monitoring. Table 5 below shows an example of continuous monitoring of a patient's body temperature (TEMP) in 5 hours consecutively using a wearable thermometer. Table 5: Body Temperature Reading example within 5 hours continuous monitoring t (hour) TEMP (°C) 2 37.6 3 37.9 4 36.9 37.0 39.6 You are instructed to design a C program with the following specification: i. Read a 5 hours body temperature measurement result to obtain hour-by-hour value as shown in Table 5 using pre-defined function. ii. Scan through the body temperature value one by one and trigger the auto alarm system using pre-defined function in case any incident is detected as below: • Any TEMP value exceeds the threshold value of 39.5°C (e.g. 1 = 5 when TEMP = 39.6°C). • When TEMP value shows an increasing trend for 3 hours consecutively (e.g. the TEMP value increase gradually from 36.9°C to 37.6°C to 37.9°C from t = 1 to 1 = 3). Two pre-defined functions are assumed have been provided as shown in Table 6 below: Table 6: Pre-defined functions for Temperature Reading and Trigger Alarm

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Develop the flow chart based on the given specification.

Due to COVID-19 pandemic which has caused high surge of patients at hospital,
patients who diagnosed COVID-19 with no symptoms or mild symptoms are instructed
to home quarantine and self-monitoring. Table 5 below shows an example of
continuous monitoring of a patient's body temperature (TEMP) in 5 hours consecutively
using a wearable thermometer.
Table 5: Body Temperature Reading example within 5 hours continuous monitoring
t (hour)
TEMP (°C)
1
36.9
3
4
37.6
37.9
37.0
39.6
You are instructed to design a C program with the following specification:
i. Read a 5 hours body temperature measurement result to obtain hour-by-hour
value as shown in Table 5 using pre-defined function.
ii. Scan through the body temperature value one by one and trigger the auto alarm
system using pre-defined function in case any incident is detected as below:
• Any TEMP value exceeds the threshold value of 39.5°C (e.g. 1 = 5 when
TEMP = 39.6°C).
When TEMP value shows an increasing trend for 3 hours consecutively
(e.g. the TEMP value increase gradually from 36.9°C to 37.6°C to 37.9°C
from t = 1 to 1 = 3).
Two pre-defined functions are assumed have been provided as shown in Table 6 below:
Table 6: Pre-defined functions for Temperature Reading and Trigger Alarm
Function name
Description
void read_TEMP(int a[]) This function provides a 5 hours TEMP value based on
|hour-by-hour measurement as example shown in Table 5
which store in an array a[] with size of 5.
void trigger_alarm(int b) This function control the auto alarm system by setting the
argument b value: 0– OFF alarm, 1 – ON alarm
Transcribed Image Text:Due to COVID-19 pandemic which has caused high surge of patients at hospital, patients who diagnosed COVID-19 with no symptoms or mild symptoms are instructed to home quarantine and self-monitoring. Table 5 below shows an example of continuous monitoring of a patient's body temperature (TEMP) in 5 hours consecutively using a wearable thermometer. Table 5: Body Temperature Reading example within 5 hours continuous monitoring t (hour) TEMP (°C) 1 36.9 3 4 37.6 37.9 37.0 39.6 You are instructed to design a C program with the following specification: i. Read a 5 hours body temperature measurement result to obtain hour-by-hour value as shown in Table 5 using pre-defined function. ii. Scan through the body temperature value one by one and trigger the auto alarm system using pre-defined function in case any incident is detected as below: • Any TEMP value exceeds the threshold value of 39.5°C (e.g. 1 = 5 when TEMP = 39.6°C). When TEMP value shows an increasing trend for 3 hours consecutively (e.g. the TEMP value increase gradually from 36.9°C to 37.6°C to 37.9°C from t = 1 to 1 = 3). Two pre-defined functions are assumed have been provided as shown in Table 6 below: Table 6: Pre-defined functions for Temperature Reading and Trigger Alarm Function name Description void read_TEMP(int a[]) This function provides a 5 hours TEMP value based on |hour-by-hour measurement as example shown in Table 5 which store in an array a[] with size of 5. void trigger_alarm(int b) This function control the auto alarm system by setting the argument b value: 0– OFF alarm, 1 – ON alarm
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY