Search for question
Question

1 Modify and refactor the attached EnergyExpenditure sample solution so that it:

a) uses a switch statement to look up the activity factor

b) continues to ask the user for input until they quit, using a do-while loop

c) includes the following methods:

i) calculateBMR (): accepts all the required information and returns the BMR

ii) displayActivityLevels (): displays the selection of activity levels

iii)

getActivityFactor (): accepts the selection (A-E) and returns the activity factor

iv) calculateTDEE (): accepts the BMR and Activity Factor and returns the TDEE

v) displayResults(): Displays the calculated BMR and TDEE values