Question: BMI class: create FindBMI() method to return BMI value according to height and weight. BMI.java public class BMI { private double height, weight; BMI(double height,

BMI class:

create FindBMI() method to return BMI value according to height and weight.

BMI.java

public class BMI { private double height, weight;

BMI(double height, double weight) { this.height = height; this.weight = weight; }

BMI() { height = 0.0; weight = 0.0; }

void setHeight(double updateHeight) { height = updateHeight; }

void setWeight(double updateWeight) { weight = updateWeight; } double getHeight() { return height; }

double getWeight() { return weight; }

// 1. create FindBMI() method to return BMI value according to height and weight: public String toString() { return "Height " + height + "\t Weight: " + weight; }

}

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!