C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 3.15MAD

(Target-Heart-Rate Calculator) While exercising, you can use a heart-rate monitor to see that your heart rate stays within a safe range suggested by your trainers and doctors. According to the American Heart Association (AHA) (http://bit.ly/AHATargetHeartRates), the formula for calculating your maximum heart rate in beats Fr minute is 220 minus your age in years. Your target heart rate is a range that's 50-85% Of your maximum heart rate. (Note: These formulas are estimates provided by the AHA. Maximum and target heart rates may vary based on the health, fitness and gender of the individual. Always consult a physician or qualified health-care professional before beginning or modifying an exercise program.) Create a class called HeartRates. The class attributes should include the last name and date of birth (consisting of separate attributes for the month, day and year of birth). Your class should have a constructor that receives this data as parameters. For each attribute provide set and get functions. The class also should include a member function that calculates and returns the person's age (in years), a member function that calculate sand returns a person's maximum heart rate, and a member function that calculates and returns the person’s target heart rate. Write a that prompts for the person's information,instantiates an object of class HeartRates and prints the information from that object-including the person’s first name, last name and date of birth- then calculates and prints the person's age in (years), maximum heart rate and target-heart-rate range.

Blurred answer
Students have asked these similar questions
What is the output from each of the following pseudocode statements?
What is the output from the following statement?
Program - python A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula: calories from fat = fat grams x 9. Next, she calculates the number of calories that result from the carbohydrates, using the following formula: calories from carbs = carb grams x 4. Write a program that will make these calculations. Your  program should use two separate functions to calculate fat and carb calories. Write a 3rd function that is called from main to capture user input and call the others.
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Literals in Java Programming; Author: Sudhakar Atchala;https://www.youtube.com/watch?v=PuEU4S4B7JQ;License: Standard YouTube License, CC-BY
Type of literals in Python | Python Tutorial -6; Author: Lovejot Bhardwaj;https://www.youtube.com/watch?v=bwer3E9hj8Q;License: Standard Youtube License