The BMI class Add the following new constructor in the BMI c

(The BMI class) Add the following new constructor in the BMI class/**Construct a BMI with the specified name, age, weight, feet, and inches */public BMI (String name, int age, double weight, double feet, double inches)

Solution

class BMI

{

private String name;

private int age;

private double weight;

private double feet;

private double inches;

public BMI(String name,int age,double weight,double feet,double inches)

{

//use this pointer to initialize variables

this.name = name;

this.age = age;

this.weight = weight;

this.feet = feet;

this.inches = inches;

}

}

 (The BMI class) Add the following new constructor in the BMI class/**Construct a BMI with the specified name, age, weight, feet, and inches */public BMI (Strin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site