StayFit has been a very successful product among its core users who are now begging for even more functionality. You are being asked to modify your product to start retaining historical data until the program is exited and perform calculations on those historical values. (hint you will need to use data structures such array, arraylist or hashmap)
In the next iteration of the health calculator, in addition to retaining its current ability to perform all the calculation in the table below, it will also output the following for a specific user:
These averages should be printed at the end only when the user elects to exit the program.
Next to the averages, be sure to print out all the values that were used in calculating those averages. Example:
"Your average weight 95lbs is based on the following readings (100, 90,92,97, 96,..)
The program should be able to track and perform calculation for multiple users. If a new user starts using the health calculator without exiting the program should be able to track his data separately from the previous user.
Finally, your StayFit application will be a little smarter and will print a random diet tips for each users after performing calculation. The 5 random diet tips of the day are:
Men | Women | |||||||||||||||||||||
Ideal Body Weight | The ideal weight for a man who is exactly 5 feet tall is 106 pounds. For every additional inch above 5 feet, add 6 pounds. For the individual shorter than 5 feet tall, subtract 2 pounds for each inch under 5 feet | The ideal weight for a woman who is exactly 5 feet tall is 100 pounds. For every additional inch above 5 feet, add five pounds. For the individual shorter than 5 feet tall, subtract 5 pounds for every inch you measure below 5 feet. | ||||||||||||||||||||
Daily caloric and fat intake | If you are completely inactive and do not exercise, multiply your adjusted ideal weight by 11. If you regularly exercise two to three times per week, multiply your adjusted ideal weight by 13. If you regularly exercise four to five times a week, multiple your adjusted ideal weight by 15 Finally, if you regularly exercise six to seven times a week, multiply your adjusted ideal weight by 18. | |||||||||||||||||||||
Body Mass Index | (Weight lb x 4.88) / (Height ft)2
| |||||||||||||||||||||
Basal Metabolic Rate | BMR = 66 + ( 6.23 x weight in pounds ) + ( 12.7 x height in inches ) - ( 6.8 x age in year ) | BMR = 655 + ( 4.35 x weight in pounds ) + ( 4.7 x height in inches ) - ( 4.7 x age in years ) | ||||||||||||||||||||
Body Fat Percentage | Adult Body Fat % = (1.20 x BMI) + (0.23 x Age) - (10.8 x gender) - 5.4 | Adult Body Fat % = (1.20 x BMI) + (0.23 x Age) - (10.8 x gender) - 5.4 | ||||||||||||||||||||
gender = 1 | gender = 0 | |||||||||||||||||||||
| ||||||||||||||||||||||
Body Adiposity Index | Body Adiposity Index BAI = ( HC / (HM)1.5 ) - 18 Where BAI = Body Adiposity Index HC = Hip Circumference in Centimeter HM = Height in Meter | |||||||||||||||||||||
Waist to Hip ratio |
|
Your software will prompt the user for the needed information in order to perform the calculations and present the user with useful information about his/her current health status. The application will perform calculation based on the user's sex and will print user friendly messages next to the calculated number. The calculation will also show the averages/min/max for certain data. In addition the results will include a random diet tip of the day. After printing the calculation results, the application will prompt the user to exit the application or continue using it and will proceed according to the users choice.
groupId = livewell
artifactId = StayFit
version = 3.0