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”.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
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”.
Step by step
Solved in 3 steps with 2 images