Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A health care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously because of

A health care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously because of sensitive privacy and security concerns, among others. Computerizing health records could make it easier for patients to share their health profiles and histories among their various health care professionals. This could improve the quality of health care, help avoid drug conflicts and erroneous drug prescriptions, reduce costs and in emergencies could save lives. In this exercise, you’ll design a “starter” HealthProfile structure for a person. The structure’s members should include the person’s first name, last name, gender, date of birth (consisting of separate attributes for the month, day and year of birth), height (in inches) and weight (in pounds). Your program should have a function that receives this data and uses it to set the members of a HealthProfile variable. The program also should include functions that calculate and return the user’s age in years, maximum heart rate and target-heart-rate range (see Exercise 3.47), and body mass index (BMI; see Exercise 2.32). The program should prompt for the person’s information, create a HealthProfile variable for that person and display the information from that variable—including the person’s first name, last name, gender, date of birth, height and weight—then calculate and display the person’s age in years, BMI, maximum heart rate and target-heart-rate range. It should also display the “BMI values” chart from Exercise 2.32.

Requirements

  • You will include comments at the start of your program with your name, date written, and purpose of the program.

  • Create a structure called HealthProfile

  • Add the following members to the structure:

- First Name

- Last Name

- Gender

- Date of Birth

- Month

- Day

- Year

- Height (in inches)

- Weight (in pounds)

  • Have functions that read in data for fill these "fields"

  • Have additional functions that calculate max and target heart rates

  • Have additional function that calculates BMI

  • Have a function that displays the data.

  • Call your functions in the following order:

- Function for reading in the data

- Calculating the Max Heart Rate (display this value)

- Calculating the Target Heart Rate (display this value)

- Calculating the BMI (display this value)

  • Use the test details as your guide for prompts and outputs in the interaction.

Hints

  • Ask for and store the current year as an integer to assist you in calculating the patient's current age. You should do when asking the user for data for your structure.

  • Use the 85% upper value of the target range to calculate the target heart rate.

  • When trying to input the date use the following conversion specifier "%d/%d/%d"

Example:

Please enter the current year

2017

Please enter the patient's last name

Smith

Please enter the patient's first name

John

Please enter the patient's birthday as mm/dd/yyyy

1/25/1980

Please enter the patient's height in inches

65

Please enter the patient's weight in pounds

200

The patient's name is John Smith

The patient's max heart rate is 183

The patient's target heart rate is 155

The patient's BMI is 33.278107

Step by Step Solution

3.36 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

include include using namespace std struct birthday Attributes of birthday int month int day int yea... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Management For Decision Makers

Authors: Peter Atrill, Paul Hurley

2nd Canadian Edition

138011605, 978-0138011604

More Books

Students also viewed these Programming questions