Question: Write a program to calculate Body Mass Index (BMI) given a person's height and weight. Use previousassignments and demo programs as models. Create a new
Write a program to calculate Body Mass Index (BMI) given a person's height and weight. Use previousassignments and demo programs as models.
- Create a new project called03.05Body Mass Index in your Mod03Assignments folder.
- Create a class called BMI in the newly-created project folder.
- Ask the user to enter their first name and last name, height (in feet and inches), and weight (in pounds). You should have conversion factors for English to metric units available from an earlier program.
- Height will be entered in feet and inches as indicated in the screen shot of expected output shown below (e.g. 5 10 represents 5 feet 10 inches).
- Use the standard formula in metric units to calculate the BMI. Formula: weight / height2. Where weight is in kilograms and height is in meters.
- Interpret the BMI value to provide a weight status using the following table:
| BMI | Weight Status |
|---|---|
| Below 18.5 | Underweight |
| 18.524.9 | Normal or Healthy Weight |
| 25.029.9 | Overweight |
| 29.9 and Above | Obese |
- Display the output in a user-friendly fashion.
- The numeric results should be rounded using arithmetic (see 3.04 BMR program).
Step by Step Solution
3.38 Rating (145 Votes )
There are 3 Steps involved in it
Heres a Java program to calculate Body Mass Index BMI based on the provided requirements java import ... View full answer
Get step-by-step solutions from verified subject matter experts
