Create a java program that will ask the weight (kg) and height (cm) of the user, the program will calculate and display the user's BMI status. If the BMI of a person is greater than or equal to 30, display “Obese”,  if the BMI greater than or equal to 25, display “Overweight”, and if the BMI is greater than or equal to 18.5, display “Normal”, else display “Underweight”.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

 FOLLOW THE TEMPLATE GIVEN!!

  • Use the class conversion guide given below in creating the program.
  • Do not use any advanced methods other than the given class conversion guide

Problem: Create a java program that will ask the weight (kg) and height (cm) of the user, the program will calculate and display the user's BMI status. If the BMI of a person is greater than or equal to 30, display “Obese”,  if the BMI greater than or equal to 25, display “Overweight”, and if the BMI is greater than or equal to 18.5, display “Normal”, else display “Underweight”. 

A method used to acquire the value of a String
variable and convert it into an integer data type.
Integer.parselnt()
Syntas:
public static int parseln String s)
Parameter:
s- the string variable that you wish to
convert into an integer.
Return value:
Returns the converted integer data type of a
decimal number.
Double.parseDouble)
A method used to aoquire the value of a String
variable and convert it into an double data type.
Syntax:
public static double parseDouble(String s)
Parameter:
s- the string variable that you wish to
convert into a double data type.
Return value:
Returns the convertod double data type
from the String parameter provided.
A method used to acquire the value of a String
variable and convert it into a f
Syntax:
public static float parseFloat( String s)
Parameter:
Float.parseFloat()
loat data type.
s- the string variable that you wish to
convert into a float data type.
Return value:
Returns the converted float data type from
the String parameter provided.
Integer.toString)
Converts an integer variable into a String
Float.teString0
Converts a float variable into a String
Double.toString0
Converts a double variable into a String
Transcribed Image Text:A method used to acquire the value of a String variable and convert it into an integer data type. Integer.parselnt() Syntas: public static int parseln String s) Parameter: s- the string variable that you wish to convert into an integer. Return value: Returns the converted integer data type of a decimal number. Double.parseDouble) A method used to aoquire the value of a String variable and convert it into an double data type. Syntax: public static double parseDouble(String s) Parameter: s- the string variable that you wish to convert into a double data type. Return value: Returns the convertod double data type from the String parameter provided. A method used to acquire the value of a String variable and convert it into a f Syntax: public static float parseFloat( String s) Parameter: Float.parseFloat() loat data type. s- the string variable that you wish to convert into a float data type. Return value: Returns the converted float data type from the String parameter provided. Integer.toString) Converts an integer variable into a String Float.teString0 Converts a float variable into a String Double.toString0 Converts a double variable into a String
|Computin...
Computing for the BMI
Height in meters : 1.8
Weight in kg : 95
Compute
BMI:
29.32
BMI Status: Over Weight
Transcribed Image Text:|Computin... Computing for the BMI Height in meters : 1.8 Weight in kg : 95 Compute BMI: 29.32 BMI Status: Over Weight
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT