Write a C++ program to keep records of 3 patients. You will need to use a C++ structure to define and store the patients' information. The structure has seven entities: PatientID, First Name, Last...


Write a C++ program to keep records of 3 patients. You will need to use a C++ structure to<br>define and store the patients' information. The structure has seven entities: PatientID, First<br>Name, Last Name, Gender, Height, Weight, Body Mass Index (BMI). Function Prototypes<br>are below:<br>void Read(PatientData e[], int n);<br>void FindBMI (PatientData e[], int n);<br>void Display(PatientData e[], int n);<br>float findLowestBMI(PatientData e[], int n);<br>int findPatientByid(PatientData e[], int id, int n);<br>i) sCreate a structure called PatientData with seven entities: PatientID, first_name,<br>last_name, gender, height, weight and BMI;<br>ii) Write a function, called Read that reads the Patient' information: ID, First Name,<br>Last Name, Gender, Height, and Weight.<br>iii) Create the function FindBMI that would calculate the BMI for each patient and<br>update their resulting BMI which is calculated as follows:<br>iv) Create the function Display that would print the content of the structure in a tabular<br>format.<br>v) Create the function findLowestBMI that would return the ID of the patient with the<br>lowest BMI based on the BMI calculated of each patient.<br>vi) Create the function findPatientByid that would return the index of the passed ID if<br>found and -1 otherwise. You then have to display the full name of the patient in<br>the main with that ID if it exists. If not, please print that the patient's ID does not<br>exists.<br>The output of your program might look similar to the example below (user input indicated in bold).<br>ID<br>First Name<br>Last Name<br>Gender Weight<br>Height<br>BMI<br>10212<br>Tom<br>Hanks<br>M<br>100<br>170<br>34.6<br>10213<br>Bob<br>Smith<br>M<br>50<br>150<br>22.2<br>10215<br>Lisa<br>Evans<br>F<br>90<br>165<br>33.1<br>The Id of the Patient with the lowest BMI is: 10213<br>Add to Favorites<br>Enter the ID > 10215<br>The name of the patient with ID 10215 is Lisa Evans<br>

Extracted text: Write a C++ program to keep records of 3 patients. You will need to use a C++ structure to define and store the patients' information. The structure has seven entities: PatientID, First Name, Last Name, Gender, Height, Weight, Body Mass Index (BMI). Function Prototypes are below: void Read(PatientData e[], int n); void FindBMI (PatientData e[], int n); void Display(PatientData e[], int n); float findLowestBMI(PatientData e[], int n); int findPatientByid(PatientData e[], int id, int n); i) sCreate a structure called PatientData with seven entities: PatientID, first_name, last_name, gender, height, weight and BMI; ii) Write a function, called Read that reads the Patient' information: ID, First Name, Last Name, Gender, Height, and Weight. iii) Create the function FindBMI that would calculate the BMI for each patient and update their resulting BMI which is calculated as follows: iv) Create the function Display that would print the content of the structure in a tabular format. v) Create the function findLowestBMI that would return the ID of the patient with the lowest BMI based on the BMI calculated of each patient. vi) Create the function findPatientByid that would return the index of the passed ID if found and -1 otherwise. You then have to display the full name of the patient in the main with that ID if it exists. If not, please print that the patient's ID does not exists. The output of your program might look similar to the example below (user input indicated in bold). ID First Name Last Name Gender Weight Height BMI 10212 Tom Hanks M 100 170 34.6 10213 Bob Smith M 50 150 22.2 10215 Lisa Evans F 90 165 33.1 The Id of the Patient with the lowest BMI is: 10213 Add to Favorites Enter the ID > 10215 The name of the patient with ID 10215 is Lisa Evans
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here