The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Chapter 3
Exercise 3.16 (Target-Heart-Rate Calculator) While exercising, you can use a hear-rate monitor to see that your heart rate stays within a safe range suggested by your trainders and doctors. According tot he American Heart Association (AHA) (www.americanheart.org/presenter.jhtml?identifer=4376) the formual for calculatinf your maximus heart rate in beats per minute is 220 minus your age in yers. Your target heart rate is a range that's 50-85% of your maximus heart rate. (Note: these formulas are estimates provided by AHA. Max and target heart rates may vary based on health, fitness and gender of individual.
Create a class called HeartRates. The class attributes should include the person's first name, 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 methods. The class also should include a method that calculates and returns the persons age (in years) , a method that caclulates and returns the persons maximum heart rate and a method that calculates and returns the person's target heart rate. Write a Java app that prompts for the person's information, instantiates an object of a class HeartRates and prints the info 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), max heart rate and target heart rate range.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll