You are to write a Java console application that calculates and classifies BMI (Body Mass Index) for individuals. The number of individuals (N) is fixed at 10, so it should be declared as final int N = 10 in your program.
BMI is calculated using the following equation:
BMI = weight / (height*height)
where weight is in kilograms and height is in metres.
Wikipedia defines the following 8 categories for
BMI:
Category | BMI (kg/m2) | |
from | to | |
Very severely underweight | 15 | |
Severely underweight | 15 | 16 |
Underweight | 16 | 18.5 |
Normal (healthy weight) | 18.5 | 25 |
Overweight | 25 | 30 |
Obese Class I (Moderately obese) | 30 | 35 |
Obese Class II (Severely obese) | 35 | 40 |
For each person, you are to enter their weight (in kilograms) and height (in metres).The application is to then calculate and display the BMI, together with the corresponding 8 level category. When all data has been entered, a summary report consisting of
- The lowest BMI
- The highest BMI
- The average BMI
- The number of individuals with normal BMI
- The number of individuals with higher than normal BMI
- The number of individuals with lower than normal BMI is displayed.
If you are looking COIT20245 Assignment 1, plagfree.com is here to help you.
Leave A Comment