Assignment Regulations & Example Assignment
You are to produce a Body Mass Index (BMI) calculator. A BMI is calculated based on a person's height and weight and is used to estimate a healthy body weight for a given height.
As your calculator should be suitable for an international audience it should allow entry of height and weight in meters and kilograms or inches and pounds. The formulae for calculating BMI are:
BMI = weight (kg) / height (m) squared
BMI = weight (pounds) * 703 / height (inches) squared
BMI less than 10 or greater than 35 are considered to be unreliable. Otherwise the interpretation of a BMI is to be according to the table below:
| BMI range | Interpretation |
|---|---|
<= 17.9 |
Underweight |
> =18 and <= 25.9 |
Normal |
>=26 and <= 29.9 |
Overweight |
>= 30 |
Obese |
Develop a user friendly product using Visual Basic which will calculate and interpret a BMI for an international audience.
Assume that any input by the user is valid (no error checking of input is required).
You can either assume that a BMI of 25.95, for instance, is outside of the Normal range or you can convert your BMI results to one decimal place using the Round function as described in the lecture notes for the 7th May.
Run 1 Please enter your name ? James Which units would you like to use (1. Pounds and inches 2. Kilograms and meters)? 1 Please enter your weight ? 176 Please enter your height ? 69 James, your BMI indicates that you are overweight for your height Run 2 Please enter your name ? James Which units would you like to use (1. Pounds and inches 2. Kilograms and meters)? 2 Please enter your weight ? 80 Please enter your height ? 1.76 James, your BMI indicates that you are normal weight for your height Run 3 Please enter your name ? Bruce Which units would you like to use (1. Pounds and inches 2. Kilograms and meters)? 2 Please enter your weight ? 145 Please enter your height ? 1.70 Sorry Bruce, but results are unreliable for the height and weight you entered Run 4 Please enter your name ? Susan Which units would you like to use (1. Pounds and inches 2. Kilograms and meters)? 2 Please enter your weight ? 54 Please enter your height ? 1.75 Susan, your BMI indicates that you are underweight for your height Run 5 Please enter your name ? Nathan Which units would you like to use (1. Pounds and inches 2. Kilograms and meters)? 1 Please enter your weight ? 198 Please enter your height ? 70 Nathan, your BMI indicates that you are overweight for your height
The assignment should be word processed with each page numbered. Suggested left margin 2.5cm, right margin a minimum of 1cm.
The following sections are required (in this order).
This should contain:
This must contain:
The work will not be marked without a signed statement of authorship.
The code should:
Copy the code from Access and paste it into your word processed document.
The code listing should:
You must include a statement indicating whether the code listed successfully compiled (no syntax errors).
Example statement: "The code listed below compiled successfully." or "The code listed below did NOT compile."
Your runs must be made using the program listed in the previous section. You must include a statement indicating that the program runs are for your program as listed in the previous section.
Example statement: "The program runs below are the output of the program listed in the previous section."
| Test Number | Reasons | Inputs | Expected Results | Actual Results | Correct? |
|---|---|---|---|---|---|
| 1 | Normal weight | units = 1 weight = 140 |
BMI = Interpretation = |
||
| 2 | Unreliable results | units = 2 weight = 110 |
BMI = Interpretation = |
||
| 3 | Obese | units = 2 weight = 98 |
BMI = Interpretation = |
||
| 4 | Underweight | units = 1 weight = 121 |
BMI = Interpretation = |
||
| 5 | Overweight | units = 2 weight = 90 |
BMI = Interpretation = |
The following is a guide to the marks assigned to each section of the assignment.
| Section Name | Percentage of Marks |
|---|---|
| Presentation | 5% |
| Defining Diagram | 10% |
| Pseudo Code | 40% |
| Data Dictionary | 5% |
| Desk Check | 10% |
| Access Basic Code | 20% |
| Test Plan & Runs | 10% |
Written by Chris Cope (and Tim Whitfort).