Question: Name this class BMICalculator, and thus the java file should be named BMICalculator.java. b ) This program needs the Converter.java ( made in Q 1

Name this class BMICalculator, and thus the java file should be named
BMICalculator.java.
b) This program needs the Converter.java (made in Q1) as supporting class. Make sure you save
this java file in the same folder with the Converter.java, so they will be considered in one
package.
c) This program needs three (3) methods:
A main method that takes user selection of measuring system; use a selection
structure (IF-ELSE or SWITCH) to take user input of height and weight, call the
other two methods to calculate the BMI value and analyze the results.
If the user chooses imperial system, need to convert the user input into
metric system as the BMI calculating method below will use metric units
for calculation.
If the user inputs a number that is not 1 or 2, display a message Invalid measuring
system selection.
d) A value return method to calculate bmi using the weight in kilogram and height in meter
(height and weight as parameters).
BMI = weight_in_KG /(height_in_meter * height_in_meter)
This method returns a double value for BMI
e) A void / action method to display the BMI assessment and suggestion like below. This
method takes BMI value as parameter, and display the assessment and suggestions as actions.
No value will be returned.
BMI Value Assessment Suggestions
Below 18.5 Underweight Eat more and gain some weight.
18.5 BMI <25 Normal Keep it up.
25 BMI <30 Overweight Watch out eating and do more
exercise
30 or above Obese See doctor for professional
treatment.
f) Be careful on how to call the value-return method and how to call the void/action method in
the main method.
g) DO NOT use any global variables in this question. We are still practicing using local
variables, parameters and return statements to pass the values back and forth among the
methods.
h) Program styles like program top comment block, indentation, alignment, name conventions,
etc. are all required.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!