Answered You can hire a professional tutor to get the answer.

QUESTION

A local health club has tasked you with writing code that computes the calorie intake needed to maintain a client's current weight.

A local health club has tasked you with writing code that computes the calorie intake needed to maintain a client’s current weight. A common formula for calculating calories required is the Harris-Benedict Formula:

Women: Calories = 655 + (4.35 * weight in pounds) + (4.7 * height in inches) – (4.7 * age in years)

Men: Calories = 66 + (6.23 * weight in pounds) + (12.7 * height in inches) – (6.8 * age in years)

This formula is used to calculate calories given someone’s age, height, and weight. If you do a good job, the health club will ask you to expand this program in the future to do a lot more. Because this code could be used as a building block for a larger program, you need to write these as functions.

Your assignment is to write 2 functions. One will be called WomenCalorieInTake and the other will be MenCalorieInTake. You will also write a program that uses both functions. This will let you test that your functions to make sure both work. Both functions should take parameters age, height, and weight and return the calories.

The program should output a message that says “Your age is ” followed by the age “Your height is “ followed by the height” “Your weight is “ followed by the weight “Your calorie intake to maintain your weight is “ followed by the calorie intake number.

For example, if you test your WomenCalorieInTake function by passing in values for a woman that is 21 years old, 67 inches tall, and weighs 140 pounds the output for this club member would be:

Your age is 21

Your height is 67

Your weight is 140

Your calorie intake to maintain your weight is 1480.2

For example, if you test your MenCalorieInTake function by passing in values for a man that is 21 years old, 67 inches tall, and weighs 200 pounds the output for this club member would be:

Your age is 21

Your height is 67

Your weight is 200

Your calorie intake to maintain your weight is 2020.1

First, describe your algorithm for each function using pseudocode.

Translate the pseudocode into a C++ program. You must comment your program including comments at the top of the file that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Submit 2 files:

Your Word document with your pseudocode.

Will someone help me with this Please!!!

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question