private String name; // for identification purposes
private double price; // price per meter
private double widthOfFlooring; // meter
public Flooring(String initName, double initPrice, double initWidth) {
name = initName;
price = initPrice;
widthOfFlooring = initWidth;
}
public String getName() {
return name;
}
public double getPricePerM() {
return price;
}
public double getWidth() {
return widthOfFlooring;
}
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/