AVA Programming Language: According to the American Heart Association, as you exercise you should periodically check your heart rate to ensure you are in your target zone. Your target zone is a range that is 50% to 85% of your maximum heart rate. The formula for calculating a persons maximum heart rate is 220 minus your age in years. Write a program that reads the users current heart rate, birthday, and the current day (each consisting of month, day, and year). The program should calculate the persons age (in years), the person's maximum heart rate, and the person's target heart rate zone range. Output the users age, current heart rate, target zone range. If their heart rate is in the target zone congratulate them, if it is out of their target zone warn them. Required Methods (Write these first and use them in your algorithm): (your code, particularly for computeAge, must be 100% clear and documented - it's the core of this assignment!) int computeAge(int birthMonth, int birthDay, int birthYear, int currentMonth, int currentDay, int currentYear); int computeMaximumHeartRate(int age); int computeZoneMinimum(int maximumHeartRate); int computeZoneMaximum(int maximumHeartRate);

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
100%

JAVA Programming Language:

According to the American Heart Association, as you exercise you should periodically check your heart rate to ensure you are in your target zone.  Your target zone is a range that is 50% to 85% of your maximum heart rate.  The formula for calculating a persons maximum heart rate is 220 minus your age in years.

Write a program that reads the users current heart rate, birthday, and the current day (each consisting of month, day, and year).  The program should calculate the persons age (in years), the person's maximum heart rate, and the person's target heart rate zone range.

Output the users age, current heart rate, target zone range. If their heart rate is in the target zone congratulate them, if it is out of their target zone warn them.

Required Methods (Write these first and use them in your algorithm): (your code, particularly for computeAge, must be 100% clear and documented - it's the core of this assignment!)

int computeAge(int birthMonth, int birthDay, int birthYear, int currentMonth, int currentDay, int currentYear);

int computeMaximumHeartRate(int age);

int computeZoneMinimum(int maximumHeartRate);

int computeZoneMaximum(int maximumHeartRate);

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT