Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for Java and use only switch case statements and follow the instructions on given practice excercise Project 2: Calories The Harris Benedict equation

This is for Java and use only switch case statements and follow the instructions on given practice excercise image text in transcribed
image text in transcribed
Project 2: Calories The Harris Benedict equation estimates the number of calories your body needs to maintain your weight if you do no The calories needed for a woman to maintain her weight is: BMR 655+ (4.3weight in pounds) + (4.7 height in inches) (4.7age in years) The calories needed for a man to maintain his weight is BMR 66+ (6.3 weight in pounda) (12.9 height in inches) (6.8age in years) A typical chocolate bar will contain around 230 calories. Write a program called calories that allows the user to input their weight in pounds, height in inches, and age in years. The program should then output the number o (each has 230 calories) that should be consumed to maintain one's weight for both a woman and a man of the input weight, height, and age. In addition ask the user if he or she is: A. Sedentary B. Somewhat active (exercise occasionally) C. Active (exercise 3-4 days per week) D. Highly active (exercise every day) o If the user answers "Sedentary then increase the calculated BMR by 20 percent o If the user answers Somewhat active" then increase the calculated BMR by 30 percent. o If the user answers "Active" then increase the calculated BMR by 40 percent o Finally, if the user answers "Highly active" then increase the calculated BMR by 50 percent o Output the number of chocolate bars based on the new BMR value Be consistent, the following output message should be displayed as it is This program will calculate the number of 230 calorie candy bars to eat to maintain your weight. [Q1) What is your age in years? 25 1Q21 What is your total height in inches7 72 [93] what is your weight in pounds? 170 1Q41 Enter 'M (or 'M') for male calculation or 'F' (or for female: M 1Q51 Are you: 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: C With those measurements, you should eat l1, 539652173913044 candy bars per day to maintain the sane weight

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Identify a set of competencies for tenured faculty

Answered: 1 week ago