Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a JAVA program that does some basic arithmetic operations. Body Mass Index (BMI) is a value used to get an idea of whether a

write a JAVA program that does some basic arithmetic operations. Body Mass Index (BMI) is a value used to get an idea of whether a person is of a healthy weight. There is some controversy surrounding the use of this metric, but it is an interesting thing to take a look at.

The formula for BMI is: BMI = ( Weight in Pounds / ( Height in inches * Height in inches ) ) * 703

Your task for this assignment is to write a program that prompts the user for their weight in pounds and height in inches and computes their BMI. Then, ask the user what they would like their BMI to be and tell them what they would need to weigh in order to have that BMI.

Here is a sample run of the program:

How much do you weigh (in pounds)? 115

How tall are you (in inches)? 65

Your BMI is 19.13491124260355

A BMI between 20 and 24 is considered ideal. What would you like your BMI to be? 22

Your weight needs to be 132.21906116642955 pounds for your BMI to be 22.0

You will be graded according to the following rubric (each item is worth 1 point):

You have declared variables of the appropriate data types

You have prompted the user for the required information

You have read the user's information and stored it in variables

You have correctly computed the BMI

You have correctly computed the weight for the target BMI

You have displayed the results of the computations to the user

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

LO1 Discuss four different views of motivation at work.

Answered: 1 week ago

Question

LO6 Summarize various ways to manage retention.

Answered: 1 week ago