Question: I am have issues with this code. public class BMI { public static doulbe getBMI(double weight, double height){ BMI bmi1 = new BMI(Doug Yang, 52,

I am have issues with this code.

public class BMI { public static doulbe getBMI(double weight, double height){ BMI bmi1 = new BMI("Doug Yang", 52, 245, 66); System.out.println("The BMI for " + bmi1.getName() + " is " + bmi1.getBMI() + " " + bmi1.getStatus()); BMI bmi2 = new BMI("Kaye Wi", 34, 176, 61); System.out.println("The BMI for " + bmi2.getName() + " is " + bmi2.getBMI() + " " + bmi2.getStatus()); } }

Here is my error's

C:\JavaChapter10>javac BMI.java BMI.java:2: error: cannot find symbol public static doulbe getBMI(double weight, double height){ ^ symbol: class doulbe location: class BMI BMI.java:3: error: constructor BMI in class BMI cannot be applied to given types; BMI bmi1 = new BMI("Doug Yang", 52, 245, 66); ^ required: no arguments found: String,int,int,int reason: actual and formal argument lists differ in length BMI.java:4: error: cannot find symbol System.out.println("The BMI for " + bmi1.getName() + " is " ^ symbol: method getName() location: variable bmi1 of type BMI BMI.java:5: error: method getBMI in class BMI cannot be applied to given types; + bmi1.getBMI() + " " + bmi1.getStatus()); ^ required: double,double found: no arguments reason: actual and formal argument lists differ in length BMI.java:5: error: cannot find symbol + bmi1.getBMI() + " " + bmi1.getStatus()); ^ symbol: method getStatus() location: variable bmi1 of type BMI BMI.java:7: error: constructor BMI in class BMI cannot be applied to given types; BMI bmi2 = new BMI("Kaye Wi", 34, 176, 61); ^ required: no arguments found: String,int,int,int reason: actual and formal argument lists differ in length BMI.java:8: error: cannot find symbol System.out.println("The BMI for " + bmi2.getName() + " is " ^ symbol: method getName() location: variable bmi2 of type BMI BMI.java:9: error: method getBMI in class BMI cannot be applied to given types; + bmi2.getBMI() + " " + bmi2.getStatus()); ^ required: double,double found: no arguments reason: actual and formal argument lists differ in length BMI.java:9: error: cannot find symbol + bmi2.getBMI() + " " + bmi2.getStatus()); ^ symbol: method getStatus() location: variable bmi2 of type BMI 9 errors

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!