Question: CS 240 Fall 2017 Program #2 100 Points Deadline: Friday, October 6 11:55PM You are to create a class called FitnessTracker that tracks calories and
CS 240 Fall 2017 Program #2 100 Points Deadline: Friday, October 6 11:55PM You are to create a class called FitnessTracker that tracks calories and weight for a person over the course of some days. This class must store the following data about a person: Age (in whole years) Height (in inches) Weight (in pounds) Gender 'M'or 'F' Calories Burned Calories Consumed Create the following functions in the class: Default and initializing constructors. Accessor (set) functions. Mutator (get) functions. Functions that calculate the Resting Metabolic Rate (RMR), and the difference between calories burned and calories Functions to add calories burned and calories consumed. . An adjust weight function that calculates the person's change in weight and applies the change to the person's weight (return the amount of weight change). An overloaded output operator that shows all the data members plus the RMR and difference in calories. Overloaded Boolean comparison operators that compare based on the RMR of two FitnessTrackers. Make sure to convert both RMR values to ints so the will work more effectively. You won't need these in the driver, but you must have them Formulas for calculating the RMR and weight change are as follows: RMR: Males: 66 +(6.22 x weight (Ibs) +(12.7x height (inches)) (6.8 x age) Females: 655 (4.36 x weight (lbs))+(4.32 x height (inches) - (4.7 x age) Weight change difference in calories)/3500.0 Driver Details: Print a welcoming message at the start of the program. Have the user enter a person's age, height, weight, and gender. Calculate the person's RMR right away and add it to their calories burned. Then show the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
