Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

No. You are requested to develop a part of a Nutrition System by following the instructions Create a package called Types. It has a data

image text in transcribedimage text in transcribed

No. You are requested to develop a part of a Nutrition System by following the instructions Create a package called Types. It has a data type called (ActivityLevel) which handles the following 1 constants: Light, Moderate, Active And another data type called (Gender) which handles Male and Female constants. 2. Create another package called Calculator, which has two classes: Calorie and Test 3 Calorie Class includes 5 pieces of information as instance variables: age (int), gender (Gender), height (double), weight (double), activity (ActivityLevel) 4 Provide set and get methods for age and activity. Make sure age is not negative. Develop two constructors to instantiate objects with: Five arguments (age, gender, height, weight and activity) 5 Or without arguments, where the default values are: age (18), gender (Male), height (160), weight (60), activity (Moderate) Use the constructor chaining. 6 Add three methods named calculate; to calculate the following No. Method Calculation 1 BMI The body mass index (BMI) is used to assess how much an individual's body weight BMI = weight / (height2*10000) departs from what is normal or desirable for a person's height. 2 BMR Men: Basal metabolic rate is the BMR= 66 + (13.7 x weight) + (5 x height) - (6.8 x age) rate of energy expenditure Women: 3 per unit time by BMR= 655 + (9.6 x weight) + (1.8 x height) - (4.7 x age) endothermic animals at rest. TDEE It can be calculated by multiplying BMR by the activity Total Daily Energy Expenditure level factor: Light= 1.375 Moderate= 1.55 Active= 1.725 Add a method called checkBMW) Category BMI from to according to It checks the value and returns the category the following table: 0 18.5 18.5 25 Underweight Normal Overweight Obese 25 30 30 00 Add a toString() method to display a person's BMI, BMI category, BMR and TDEE. 9 Class Test instantiates one object with 5 arguments, all values should be read from the user. 10 All details of the object should be displayed. A sample of the run: Enter your age 20 Enter your gender male Enter your height in cm 170 Enter your weight in kg 80 Enter your activity level light BMI= 27.68 Category= Overweight BMR= 1876.000000 TDEE= 2579.50 Actiu Go to

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

=+ How do we define benefits and the qualifications of recipients?

Answered: 1 week ago

Question

Explain the functions of financial management.

Answered: 1 week ago

Question

HOW MANY TOTAL WORLD WAR?

Answered: 1 week ago

Question

Discuss the scope of financial management.

Answered: 1 week ago

Question

Discuss the goals of financial management.

Answered: 1 week ago