Write a program to calculate Body Mass Index (BMI) given a person's height and weight. Use previousassignments
Fantastic news! We've Found the answer you've been seeking!
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 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).
Related Book For
Intermediate Algebra
ISBN: 9780134895987
13th Edition
Authors: Margaret Lial, John Hornsby, Terry McGinnis
Posted Date: