The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do not exercise. This is called your basal metabolic rate or BMR.
1. Set appropriate variables for all data. Use meaningful names.
2. ActivityLevel variable must be a char and should be read as a char.
3. The BMR calculation result should be placed into one double variable. You should not have a separate BMR_Male and BMR_Female variables.
4. You should be using conditional statements including (if or if-else or if-elseif-...-else) statements and switch statements. It is not necessary to have nested conditions.
5. Feel free to create AS MANY variables as you need.
6. YOU MAY USE printf to format your output, but you are NOT required to. It is okay to use println() and not format the decimal output.
Valid output:
----------Please answer the questions below.----------
What is the age in years?
25
What is the total height in inches?
60
What is the weight in pounds?
150
The calorie calculation varies for a Male versus a Female.
Enter 'M' for male calculation or 'F' for female calculation.
M
Categorize your activity level as one of the following:
A. Sedentary
B. Somewhat active (exercise occasionally)
C. Active (exercise 3-4 days per week)
D. Highly active (exercise every day)
Enter A, B, C, or D.
A
----------Thank you for answering the questions.----------
Age: 25
Height: 60.0
Weight: 150.0
Gender: Male
Activity Level: Sedentary
A Male with these measurements should eat 1938.0 per day to maintain the same weight.
----------Please answer the questions below.----------
What is the age in years?
25
What is the total height in inches?
60
What is the weight in pounds?
150
The calorie calculation varies for a Male versus a Female.
Enter 'M' for male calculation or 'F' for female calculation.
M
Categorize your activity level as one of the following:
A. Sedentary
B. Somewhat active (exercise occasionally)
C. Active (exercise 3-4 days per week)
D. Highly active (exercise every day)
Enter A, B, C, or D.
F
----------Thank you for answering the questions.----------
Age: 25
Height: 60.0
Weight: 150.0
Gender: Male
Activity Level: not identified
A Male with these measurements should eat 1615.0 per day to maintain the same weight.
Invalid Male/Female input:
----------Please answer the questions below.----------
What is the age in years?
25
What is the total height in inches?
60
What is the weight in pounds?
150
The calorie calculation varies for a Male versus a Female.
Enter 'M' for male calculation or 'F' for female calculation.
<
Categorize your activity level as one of the following:
A. Sedentary
B. Somewhat active (exercise occasionally)
C. Active (exercise 3-4 days per week)
D. Highly active (exercise every day)
Enter A, B, C, or D.
A
Invalid entry for gender.