Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Do it in Java language Write a program that calculates an average of body mass index (BMI) of students in a class. The

QUESTION 1

Do it in Java language Write a program that calculates an average of body mass index (BMI) of students in a class. The formula is: (weight is in pounds and height is in inches) BMI = Prompt the user to enter the number of students Next, enter the students weight and height. Calculate the BMI for each student and sum up the BMI for all students. Repeat this process for all students. Next, calculate the average BMI of the class. Then, the program should display the BMI category based on the average BMI as shown in the following table: Average BMI Category Less than 18.5 Underweight From 18.5 less than 25 Normal From 25.0 less than 30 Overweight From 30 and greater Obese

image text in transcribed

Sample output: run: Enter a number of students = 4 Enter weight and height for student 1: Weight (lbs) = 110.5 Height (in) = 59.7 Enter weight and height for student 2: Weight (lbs) = 145 Height (in) = 70 Enter weight and height for student 3: Weight (lbs) = 90.9 Height (in) = 55.3 Enter weight and height for student 4: Weight (lbs) = 81 Height (in) = 65 Average BMI for this class is: 19.24 Majority the students of this class are: Normal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

=+4 What are non-union workers representations?

Answered: 1 week ago