Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need java code implementation pleas. No other language. Input Parameters: 'unitOfWeight : either pound or kilogram valueOfWeight : the weight value unitOfHeight : either
I need java code implementation pleas. No other language.
Input Parameters: 'unitOfWeight : either "pound" or "kilogram" valueOfWeight : the weight value unitOfHeight : either "foot" or "inch" valueOfHeight" : the height value Error conditions (in order of priority): 1. When the unitOfWeight' is neither "pound" nor "kilogram" (case sensitive). 2. When the unitOfHeight' is neither "foot" nor "inch" (case sensitive). 3. When not both weight value and height value are positive. If multiple error conditions hold, return a message related to the error with the highest priority. e.g., invoking getBMIReport ("Pounds", -154.3, "Inches", -66.92) has all inputs invalid, but only an error message about weight unit is returned. What to return? - Return an error message if there is any error. - Otherwise, calculate the Body Mass Index (BMI) by: weight (in kilogram) divided by the square of height (in meters). + Use the following conversion rates (when needed): 1 inch is 0.0254 meter (use it when unitOfHeight' is "inch") is 0.3048 meter + The calculation result must be formatted with 2 digits after the decimal: + Also, include an interpretation message (case sensitive) according to the following scheme: BMIStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started