QuestionQuestion

Body mass index (BMI) is a measure of health based on height and weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. The interpretation of BMI for people 20 years or older is as follows:

BMI, Interpretation, Exercises, Medicine
BMI < 18.5 Underweight 2 miles running Vitamin tablets
18.5   ≤ BMI < 25.0 Normal 2 miles running NA
25.0   ≤ BMI < 30.0 Overweight 3 miles running Pills
<30.0 ≤ BMI Obese 4 miles running + weights Insulin shot

Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.45359237 kilograms, and one inch is 0.0254 meters. Once you computed BMI, you should give the recommendations to input user.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.Scanner;

public class Main {

    public static void main(String[] args){

       Scanner scanner = new Scanner(System.in);
       System.out.println("Please enter the weight (in pounds)");
       double weight = scanner.nextDouble();
       System.out.println("Please enter the height (in inches)");
       double height = scanner.nextDouble();
       System.out.println("Please enter food taken");
       String food = scanner.next();
       System.out.println("Please enter your Ethnicity");
       String ethnicity = scanner.next();...

By purchasing this solution you'll be able to access the following files:
Solution.java.

$30.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats