aerobic

Document Sample
aerobic
Heart Rate for Aerobic Exercise

August 31, 1999





1 The Problem

To receive the maximum bene…t from aerobic exercise, it is important to

elevate the heart rate (measured in beats per minute) so that it lies in a

certain target zone. The target zone is a function of a person’s age. To

compute the target zone, perform the following computations.



² Subtract the person’s age from the number 220. Call this number n.



² The upper bound of the range is :85 ¤ n.



² The lower bound of the range is :65 ¤ n.



The heart rate should be within the range :65 ¤ n to :85 ¤ n. For example, for

a person 18 years of age, n = 220 ¡ 18 = 202. Therefore, :65 ¤ n = 131:3 and

:85 ¤ n = 171:7, and so the target zone for an 18-year-old person is between

131 and 172 (after rounding o¤).





2 The Program

Write a Java program that will prompt the user for his or her age and then

output the target range. The output should look something like the dialog

below.

Input your age: 18

Target zone: 131 to 172

The boldface “18” is what the user types on the keyboard.









1

3 Embellishment

Write the program so that it prints out the target zone for all ages between

minAge and maxAge where minAge and maxAge are integer-valued variables

whose values are selected by the user at the beginning of the program.









2


Share This Document


Related docs
Other docs by Arthur Wyndham
get in shape at home
Views: 39  |  Downloads: 0
business franchise opportunity
Views: 49  |  Downloads: 7
body bow fitness
Views: 126  |  Downloads: 2
in step
Views: 9  |  Downloads: 0
ab workout routine
Views: 868  |  Downloads: 15
fitness equipment review
Views: 28  |  Downloads: 1
weight control diet
Views: 28  |  Downloads: 4
fit club recipes
Views: 54  |  Downloads: 1
ab workout plan
Views: 258  |  Downloads: 16
exercising tips
Views: 32  |  Downloads: 1
by registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!