Syllabus

Home

Class Resources

News

CS-100 In-Class Project: Body Mass Index Calculator

Instructions:

  1. Create a program that computes a person's Body Mass Index (BMI).
  2. Design the form (shown above) such that it is easy to use and attractive. The form should display the following message: BMI is one method to determine a person's health. If your BMI is between 17 to 22, your life expectancy is longer than average. You don't need to lose weight. Women tend to believe they look their best at values between 20 to 22 and men are usually satisfied with a BMI of 23 to 25. If your BMI is less than or equal to 25, you are not considered overweight by most people. But if your BMI is 26 or more, that's not good. But you knew that already. (NOTE: If you use a lable to display this message set the WordWrap property to True)
  3. The formula to calculate BMI is: BMI is equal to your weight in pounds divided by your height in inches squared then that result multiplied by the number 703.
    1. BMI = weight/(the square of height in inches) X 703.
  4. Your form must have three text boxes: Two that allow the user to enter their height in feet and inches, and a third to enter weight in pounds. Your program will have to determine the total height in inches.
  5. The result of the calculation will be output to a picture box.
  6. Your form must also have three command buttons. One button to terminate the program, one to clear the picture box and one to initiate the calculation.