package lectures.style;
import util.annotations.WebDocuments;
import util.annotations.EditablePropertyNames;
import util.annotations.PropertyNames;
import util.annotations.StructurePattern;
import util.annotations.StructurePatternNames;
import util.annotations.Tags;
import lectures.interfaces.AnotherBMISpreadsheet;
import lectures.interfaces.BMISpreadsheet;
@Tags({ "Quote" })
@PropertyNames({ "Height", "Weight", "BMI" })
@EditablePropertyNames({ "Height", "Weight", "BMI" })
@StructurePattern(StructurePatternNames.BEAN_PATTERN)
@WebDocuments({"Lectures/Style.pptx", "Lectures/Style.pdf", "Videos/Style.avi"})
public class ABMISpreadsheetWihStyleErrorsCS2
implements BMISpreadsheet
{
double height;
double weight;
public ABMISpreadsheetWihStyleErrorsCS2() {
}
public ABMISpreadsheetWihStyleErrorsCS2(double theInitialHeight, double theInitialWeight) {
setHeight(theInitialHeight);
setWeight(theInitialWeight);
}
public double getWeight() {
return weight;
}
public void setWeight(double newValue) {
weight = newValue;
}
public double getHeight() {
return height;
}
public void setHeight(double newValue) {
height = newValue;
}
public double getBMI() {
return weight / (height * height);
}
public static void print(BMISpreadsheet aBMISpreadsheet) {
System.out.println ("Height:" + aBMISpreadsheet.getHeight());
System.out.println ("Weight:" + aBMISpreadsheet.getWeight());
System.out.println ("BMI:" + aBMISpreadsheet.getBMI());
}
public static void print(ABMISpreadsheetWihStyleErrorsCS2 aBMISpreadsheet) {
System.out.println ("Height:" + aBMISpreadsheet.getHeight());
System.out.println ("Weight:" + aBMISpreadsheet.getWeight());
System.out.println ("BMI:" + aBMISpreadsheet.getBMI());
}
public static void main (String[] args) {
print (new ABMISpreadsheetWihStyleErrorsCS2(75, 1.77));
print (new AnotherBMISpreadsheet());
}
}