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 Q 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 methods:
A main method that takes user selection of measuring system; use a selection
structure IFELSE 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 or 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 weightinKG heightinmeter heightinmeter
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 Underweight Eat more and gain some weight.
BMI Normal Keep it up
BMI Overweight Watch out eating and do more
exercise
or above Obese See doctor for professional
treatment.
f Be careful on how to call the valuereturn method and how to call the voidaction 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
