Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Convert This Program to a class and develop a demo class to test the class: pack

ID: 3660838 • Letter: C

Question

Convert This Program to a class and develop a demo class to test the class: package bmi_program; /** * * @author carlsimpson */ import java.util.Scanner; public class BMI_PROGRAM { /** * @param args the command line arguments */ public static final int BMI_CONSTANT = 703; public static void main(String[] args) { String name; int weight, height; double bmi; String msg_underweight = "According to the BMI, you are underweight"; String msg_overweight = "According to the BMI, you are overweight"; String msg_normalweight = "According to the BMI, you are normalweight"; String msg_obese = "According to the BMI, you are obeseweight"; System.out.println ("This java program calculates the BMI using british units"); Scanner KB = new Scanner(System.in); System.out.println("Please Enter Your Name"); name = KB.nextLine(); System.out.println("Enter weight in pounds"); weight = KB.nextInt(); System.out.println("Enter height in inches"); height = KB.nextInt(); bmi = (weight * BMI_CONSTANT) / (height * height); System.out.println(name + " For you weight " + weight + "and you height " + height + " your BMI is: " + bmi); if (bmi<18.5) System.out.println(msg_underweight); if ((bmi>=18.5) && (bmi<25)) System.out.println(msg_normalweight); if ((bmi>=25) && (bmi<30)) System.out.println(msg_overweight); if (bmi>30) System.out.println(msg_obese); } }

Explanation / Answer

can you please post the code clealry