Body Mass Index (BMI) Calculator

Body Mass Index (BMI) Calculator

My Student Project: C# for Beginners : Assignment #3 (Series)

Permission to publish my code submitted for the project assignment was granted by the professor.

This is a very simple windows form application that I completed for a class assignment. It is shown here to illustrate my coding style, structure, and commenting. This example is considered Level 1 – Easy.

Objective:

The main assignment objectives are:

• To create a Windows Forms application.

• Use parameterized methods and methods with return value to establish communication between objects of classes. From this point on, we will be considering separation of concerns as discussed earlier. More precisely, we will try to separate the presentation of data from the logics that manipulate the data. We let the GUI- class (Form object), be responsible for presentation of all data, and let other classes to serve the GUI by processing input data and producing the needed output data.

Description

Body Mass Index (BMI) is a measure of body fat and is commonly used within the health industry to determine whether the weight of adult men and women is healthy. BMI is calculated in relation to one’s height using the following formulas:

BMI = weight in kg / (height * height in m2) (Metric Units)

BMI = 703.0 *·weight in lb / (height * height in inch2) (U.S. Units)

2.1 The above formulas are standard for adults not taking the age into consideration. The World Health Organization’s (WHO) has recommended a body weight based on BMI values for adults, as summarized in the following table. It is used for both men and women, age 18 or older. For more information see: http://apps.who.int/bmi/index.jsp?introPage=intro_3.html.

2.2 The user should have the choice of selecting a metric or American unit type. For the metric option, the user should provide the height and weight values in meters (m) or centimeters (cm) and kilograms (kg), respectively. For the American unit the values can be given in feet (ft) or inches (in).

Demos

Blank Screen - No User Input Data

Blank Screen – No User Input Data

User Data Entry Validation

User Data Entry Validation

Example: User that is under weight

Example: User that is under weight

Example: User that is normal weight

Example: User that is normal weight

Example: User that is obese

Example: User that is obese

My Solution Code

You can view and download the GitHub repository here.

You can also download a zip archive of the project code here.

Kathleen has 15 yrs. of experience analyzing business IT needs and engineering solutions in payments, electric utilities, pharmaceutical, financial, virtual reality, and internet industries with a variety of technologies. Kathleen's project experience has been diverse ranging from executing the business analysis “design phase” to hands-on development, implementation, and testing of the IT solutions. Kathleen and her husband reside in Indiana with no children, instead living along with their fur babies.