Understand the Application The body mass index (BMI) is a measure that uses a person's height and weight to indicate if their weight is healthy. The Program Specification Write an application that calculates a Body Mass Index (BMI). You will prompt and obtain a height in centimeters and a weight in kilograms from the user at run-time. Validate user input using a conditional statement. If the input is invalid print a message to the user and exit your program. Given the user has entered valid input, your program will calculate and print out the corresponding BMI. Include an output statement that decides which BMI category that the user falls into. Calculate the BMI using the following formula: bmi = (weightKg / heightCm / heightCm) * 10000 BMI Categories: Underweight = < 18.5 Normal weight = 18.5 - 24.9 Overweight = 25 -29.9 Obesity BMI of 30 or greater
Understand the Application The body mass index (BMI) is a measure that uses a person's height and weight to indicate if their weight is healthy. The Program Specification Write an application that calculates a Body Mass Index (BMI). You will prompt and obtain a height in centimeters and a weight in kilograms from the user at run-time. Validate user input using a conditional statement. If the input is invalid print a message to the user and exit your program. Given the user has entered valid input, your program will calculate and print out the corresponding BMI. Include an output statement that decides which BMI category that the user falls into. Calculate the BMI using the following formula: bmi = (weightKg / heightCm / heightCm) * 10000 BMI Categories: Underweight = < 18.5 Normal weight = 18.5 - 24.9 Overweight = 25 -29.9 Obesity BMI of 30 or greater
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
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Question
I need help with this java lab I submitted it before but its not compiling please help me
Tips and Requirements
- Use parenthesis if needed to ensure your total calculation associativity and order of precedence produces a correct result.
- Format your bmi result to 2 decimal places of accuracy.
- Use a space around all binary operators (i.e. around arithmetic and assignment operands).
- Be sure that your output is well organized. Provide console output comments to organize your result displays.
- Define and use named constants in lieu of literal values. Where appropriate, use these named constants in your
program solution. - Keep source statement width < 80 characters.
- Be sure to include 3 parts to include in your submission file: program header, the Java* source, the program run (comment out the run).
- Remove all tabs - use spaces only.
- Adhere to the style rules as described in the Coding Style Guidelines.
- Make sure the run "matches" your source. If the run you submit could not have come from the source you submit, it will be graded as if you did not hand in a run.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 7 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education