Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

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

Step: 3

blur-text-image

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

6. What data will she need?

Answered: 1 week ago