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 2 37.6 3 37.9 4 37.0 5 t (hour) TEMP (°C) 36.9 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 ТЕМP - 39.6°C). • When TEMP value shows an increasing trend for 3 hours consecutively (c.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 – ÓN alarm a) Develop the flow chart based on the given specification. b) Develop the C program of main() based on your flowchart in question (a).
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 2 37.6 3 37.9 4 37.0 5 t (hour) TEMP (°C) 36.9 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 ТЕМP - 39.6°C). • When TEMP value shows an increasing trend for 3 hours consecutively (c.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 – ÓN alarm a) Develop the flow chart based on the given specification. b) Develop the C program of main() based on your flowchart in question (a).
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education