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.

  1. Create a new project called03.05Body Mass Index in your Mod03Assignments folder.
  2. Create a class called BMI in the newly-created project folder.
  3. 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.
  4. 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).
  5. Use the standard formula in metric units to calculate the BMI. Formula: weight / height2. Where weight is in kilograms and height is in meters.
  6. 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
  1. Display the output in a user-friendly fashion.
  2. 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

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program to calculate Body Mass Index BMI based on the provided requirements java import ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!