package lectures.interfaces;
import util.annotations.WebDocuments;
@WebDocuments({"Lectures/Interfaces.pptx", "Lectures/Interfaces.pdf", "Videos/Interfaces.avi"})
public class ABMISpreadsheetWithNonPublicMethods implements BMISpreadsheet{
double height, weight, bmi;
public double getHeight() {
return height;
}
public void setHeight(double newValue) {
height = newValue;
bmi = calculateBMI();
}
public double getWeight() {
return weight;
}
public void setWeight(double newValue) {
weight = newValue;
bmi = calculateBMI();
}
public double getBMI() {
return bmi;
}
double calculateBMI() {
return weight/(height*height);
}
}