Program must be in Java Body Mass Index (BMI) is one of the criteria that is used to calculate whether one is fit or not basing on a person’s height (m) and weight (kg). The criterion is very simple; if one’s BMI is 25 or greater, it signifies overweight. A BMI less or equal to 18.5 indicates underweight. Lastly, a BMI greater than 30 shows obesity. You have been requested to create a program that that helps the Namibian Defence Forces’ (NDF) Captain to calculates the BMI of a person (BMI = weight/height2) and also determine whether the person has also completed running 10 km in the required time. Men should complete 10km in less than 60 minutes for them to be accepted. Women should do that under 80 minutes. Both males and females are accepted if their BMI is less than 25 and greater than 18.5. For 2018 intake, there are already 6 males selected and 1 female. The values for gender, mass and weight are enter by user inputs Sample Run 1 Welcome to NDF Captain's Selection Aid. *************************************** Gender: male Mass in kilograms: 82 Height in metres: 1.82 Time for completing 10 km in minutes: 45 Output1: Candidate Selected! The number of males is now 7. Sample Run 2 Welcome to NDF Captain's Selection Aid. *************************************** Gender: male Mass in kilograms: 105 Height in metres: 1.9 Time for completing 10 km in minutes: 59 Output2: Candidate Overweight. Recommend more training Sample Run 3 Welcome to NDF Captain's Selection Aid. *************************************** Gender: female Mass in kilograms: 60 Height in metres: 1.6 Time for completing 10 km in minutes: 66 Output3: Candidate Selected! The number of females is now 2 Sample Run 4 Welcome to NDF Captain's Selection Aid. *************************************** Gender: male Mass in kilograms: 150 Height in metres: 2 Time for completing 10 km in minutes: 59 Output4: Candidate Obese. Reject! Sample Run 5 Welcome to NDF Captain's Selection Aid. *************************************** Gender: mmmmm Mass in kilograms: 82 Height in metres: 1.82 Time for completing 10 km in minutes: 59 Output5: Invalid Gender
Program must be in Java
Body Mass Index (BMI) is one of the criteria that is used to calculate whether one is fit or not basing on a person’s height (m) and weight (kg). The criterion is very simple; if one’s BMI is 25 or greater, it signifies overweight. A BMI less or equal to 18.5 indicates underweight. Lastly, a BMI greater than 30 shows obesity.
You have been requested to create a program that that helps the Namibian Defence Forces’ (NDF) Captain to calculates the BMI of a person (BMI = weight/height2) and also determine whether the person has also completed running 10 km in the required time. Men should complete 10km in less than 60 minutes for them to be accepted. Women should do that under 80 minutes. Both males and females are accepted if their BMI is less than 25 and greater than 18.5. For 2018 intake, there are already 6 males selected and 1 female. The values for gender, mass and weight are enter by user inputs
Sample Run 1
Welcome to NDF Captain's Selection Aid.
***************************************
Gender: male
Mass in kilograms: 82
Height in metres: 1.82
Time for completing 10 km in minutes: 45
Output1: Candidate Selected! The number of males is now 7.
Sample Run 2
Welcome to NDF Captain's Selection Aid.
***************************************
Gender: male
Mass in kilograms: 105
Height in metres: 1.9
Time for completing 10 km in minutes: 59
Output2: Candidate Overweight. Recommend more training
Sample Run 3
Welcome to NDF Captain's Selection Aid.
***************************************
Gender: female
Mass in kilograms: 60
Height in metres: 1.6
Time for completing 10 km in minutes: 66
Output3: Candidate Selected! The number of females is now 2
Sample Run 4
Welcome to NDF Captain's Selection Aid.
***************************************
Gender: male
Mass in kilograms: 150
Height in metres: 2
Time for completing 10 km in minutes: 59
Output4: Candidate Obese. Reject!
Sample Run 5
Welcome to NDF Captain's Selection Aid.
***************************************
Gender: mmmmm
Mass in kilograms: 82
Height in metres: 1.82
Time for completing 10 km in minutes: 59
Output5: Invalid Gender
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 6 images