Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI is defined as the body mass divided by the square of the body height, and is expressed in units of kg/m, resulting from mass in kilograms and height in meters. The BMI may be determined using a table or chart which displays BMIl as a function of mass and height using contour lines or colors for different BMI categories, and which may use other units of measurement (converted to metric units for the calculation). The BMI is a convenient way for classifying persons in to 4 categories based the BMI value as shown the following table:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I want an answer for this question without array and with the correct output

cuz every time output didn't work as the question and thanks in advance

(with java)

OVERVIEW
Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI
is defined as the body mass divided by the square of the body height, and is expressed in units of kg/m,
resulting from mass in kilograms and height in meters. The BMI may be determined using a table or chart
which displays BMI as a function of mass and height using contour lines or colors for different BMI
categories, and which may use other units of measurement (converted to metric units for the
calculation). The BMI is a convenient way for classifying persons in to 4 categories based the BMI value
as shown the following table:
BMI value
Category
Less than 18.5
Underweight
18.5 to less than 25
Normal
Overweight
Obese
25 to less than 30
30 or higher
A national study in some country to analyze the BMI of the people in the country is considered. In this
study, a set of cities is selected in the study and randomly specific number of persons are selected to
check the BMI category of each one.
Implement a java project to help in the study analysis with the following steps:
Read from the user the number of cities (minimum 6 cities.)
• For each city: city name and the number of persons (minimum 10 persons) are entered.
• For each person in a city: mass and height should be entered, BMI and BMI category have to be
computed and printed.
• For each city, the number of persons and percent ratio in each BMI category should be computed
and printed.
Finally, the program should print a summary report with the following details:
o Number of cities.
o Total number of persons and percent ratio of persons in each BMI category in all cities.
o The name of the best city which has the maximum percent of persons in normal weight
BMI category and these people's percent ratio.
O The name of the worst city which has the maximum percent of persons in obese BMI
category and these people's percent ratio.
o The name of the city which has the minimum percent of persons in underweight BMI
category and these people's percent ratio.
Transcribed Image Text:OVERVIEW Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI is defined as the body mass divided by the square of the body height, and is expressed in units of kg/m, resulting from mass in kilograms and height in meters. The BMI may be determined using a table or chart which displays BMI as a function of mass and height using contour lines or colors for different BMI categories, and which may use other units of measurement (converted to metric units for the calculation). The BMI is a convenient way for classifying persons in to 4 categories based the BMI value as shown the following table: BMI value Category Less than 18.5 Underweight 18.5 to less than 25 Normal Overweight Obese 25 to less than 30 30 or higher A national study in some country to analyze the BMI of the people in the country is considered. In this study, a set of cities is selected in the study and randomly specific number of persons are selected to check the BMI category of each one. Implement a java project to help in the study analysis with the following steps: Read from the user the number of cities (minimum 6 cities.) • For each city: city name and the number of persons (minimum 10 persons) are entered. • For each person in a city: mass and height should be entered, BMI and BMI category have to be computed and printed. • For each city, the number of persons and percent ratio in each BMI category should be computed and printed. Finally, the program should print a summary report with the following details: o Number of cities. o Total number of persons and percent ratio of persons in each BMI category in all cities. o The name of the best city which has the maximum percent of persons in normal weight BMI category and these people's percent ratio. O The name of the worst city which has the maximum percent of persons in obese BMI category and these people's percent ratio. o The name of the city which has the minimum percent of persons in underweight BMI category and these people's percent ratio.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Math class and its different methods
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education