Homework 3 Csc211.

Due Wednesday feb 4 (11:59pm)


Problem 1 (50 Points)

You can use either the Scanner class or pop-up windows to get the input.

A quantity known as the body mass index (BMI) is used to calculate the risk of weight-related health problems. BMI is computed by the formula.

BMI = W / (H / 100.0) 2

A BMI of about 20 - 25 is considered normal. Write a program to compute a persons BMI. Name your class BMI.

Requirements:

If your math is rusty there are plenty of resources online that will help you with the conversions. Also there are probably a few BMI calculators online for you to check your answers. Don't worry if your results are not exactly the same as the calculators online.

Work incrementally, that is start by getting the weight from the user, convert it to kilograms then out put the converted value. Run the program a few times just entering in the weight pick a few values for the weight in pounds and verify that your are converting it to kilograms properly. Next get the height make sure you are converting the height to inches. Then go on and convert it to centimeters, check that result. Then apply the formula. Finish the program.

Turn in Instructions

Upload BMI.java to Col using Hw3 link.