Please solve the following, please type out the code, and do not hand write because its hard to read. I would greatly appreciate it. (JAVA)

import java.util.Scanner;
// class definition
public class H1P1 {
//main function definition
public static void main(String[] args) {
//Create scanner object to take user input
Scanner sc = new Scanner(System.in);
//Prompt user to choose how they want to enter mass and height
System.out.println("Choose an option:");
System.out.println("1. Enter mass in kg and height in meters");
System.out.println("2. Enter mass in ponds and height in inches");
int option = sc.nextInt();
//Take user input for mass and height
System.out.println("Enter mass: ");
double mass = sc.nextDouble();
System.out.println("Enter height: ");
double height = sc.nextDouble();
//declare and initialize variable to store bmi
double bmi=0;
//call appropriate bmi function
if(option==1)
bmi=bmiOne(mass, height);
else if(option==2)
bmi=bmiTwo(mass, height);
//call function to print results
bmiPrinter(bmi);
}
//bmiOne function definition
public static double bmiOne(double mass, double height) {
//declare bmi variable nd initialize it to 0
double bmi=0;
//calculate bmi
bmi = mass / (height*height);
//return the bmi calculated
return bmi;
}
//bmiOne function definition
public static double bmiTwo(double weight, double height) {
//declare bmi variable nd initialize it to 0
double bmi=0;
//calculate bmi
bmi = (weight / (height*height))*703;
//return the bmi calculated
return bmi;
}
//function definition to print result
public static void bmiPrinter(double bmi) {
System.out.println("Your BMI value is : " + bmi + ".\nPlease refer to the table below to check the category for this value:");
System.out.println("\n--------------------------------------------");
System.out.println("| BMI | Category |");
System.out.println("--------------------------------------------");
System.out.println("| From 16.0 to 18.5 | Underweigth |");
System.out.println("--------------------------------------------");
System.out.println("| From 18.5 to 25 | Normal |");
System.out.println("--------------------------------------------");
System.out.println("| From 25 to 30 | Overweight |");
System.out.println("--------------------------------------------");
System.out.println("| From 30 to 35 | Moderately Obese |");
System.out.println("--------------------------------------------");
System.out.println("| From 35 to 40 | Severly Obese |");
System.out.println("--------------------------------------------");
}
}










Please solve the following, please type out the code, and do not hand write because its...
IT Java code In Lab 8, we are going to re-write Lab 3 and add code to validate user input. The Body Mass Index (BMI) is a calculation used to categorize whether a person’s weight is at a healthy level for a given height. The formula is as follows: bmi = kilograms / (meters2) where kilograms = person’s weight in kilograms, meters = person’s height in meters BMI is then categorized as follows: Classification BMI Range Underweight Less...
Write a program to calculate the Body Mass Index (BMI). The formulae to calculate the BMI are BMI = (weightinPounds x 703) / (heightinInches x heightinInches ) or BMI = weightinKilograms / (heightinMeters x heightinMeters ) Your program should read the user's weight in pounds and height in inches (or, Kilograms and meters, if you prefer), calculate and display the BMI. Your program should also display a message indicating how the BMI is evaluated, based on the following BMI values:...
+ Run C Code IMPORTANT: • Run the following code cell to create the input file, biostats.csv, which you will be using later. 74, In [ ]: N %%file biostats.csv Name, Sex, Age, Alex, M, 41, Bert, M, 42, Dave, M, 39, Elly, F, 30, Fran, F, 33, Jake, M, F, Luke, M, 34, F Myra, M, M, 38, Ruth, F, 28, 22 22 323 47 47, Height, Weight 170 200 167 70 115 143 139 280 98 75, 350...
python2.7
25 Points. Create a class named BMIGUI with the following behavior. A template has been provided for you and you cannot modify the template. You must use grid) to format the interface and you must get as close as possible the layout shown below. The entry box has a width parameter in its constructor you can use to make the box smaller 3. The BMI categories are as follows: Underweight= <18.5 Normal weight18.5-24.9 . Overweight 25-29.9 Obese BMI of...
Program 1 BMI Calculator Write a Java program to calculate the Body Mass Index (BMI) BMI can be calculated as follow BMI = (weight in pounds X 703) / (Height in inches X Height in inches)
The body mass index (BMI estimates the amount of fat in a person's body. It is defined as the person's mass m in kilograms divided by the square of the person's height h in meters. Write the formula for BMI in terms of m and h. 0 BMI In the United States, most people measure weight in pounds and height in feet and inches. When weight W is measured in pounds and height h is measured in inches, the BMI...
Lab 1: InheritanceTest Write a program called InheritanceTest1.java to support an inheritance hierarchy for class Point–Square–Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class. The private data of Point should be the x-y coordinates, the private data of Square should be the sideLength, and the private data of Cube should be depth. Provide applicable accessor methods, mutator methods, toString() methods, area() method, and volume() method to all classes. Write a program...
BMI Class. Using JAVA write Object Oriented Programming by creating class, object and method , that takes users' input (weight and Height) and calculates the BMI. If the result is less than 18.5 display "you are underweight", if the result is greater than 18.5 display "you have a normal weight", if the result is greater than 24.9 display "your weight is considered overweight", and the result is greater than 30 display "your weight is considered as obese" (BMI = 703...
- A pseudo code that prompts the user for the grades of four exams and prints its average and then code in JAVA - A pseudo code that prompts the user for value in meters and converts it to feet and inches. Print both results. and then code in JAVA -A pseudo code that will calculate the users Body Mass Index (BMI) and then display it for the user to see. Prompt the user to input their weight (in pounds) and...
c++ pls
10D yUur Tugt Sna you will have to re-take it at another time PROBLEM 1 Body Mass Index (BMI) is a measure of body fat that is useful in screening for health issues. To calculate a BMi, you need the height in inches and the weight in pounds. You square the height, then divide the weight in pounds by the squared-height. BMI is defined in terms of meters and kilograms, so to convert from pounds and inches to...