?? geometricobject.java
字號:
package counttest;
public abstract class GeometricObject {
private String color = "white";
private boolean filled;
/** Construct a default geometric object */
protected GeometricObject() {
}
/** Construct a geometric object with specified properties */
protected GeometricObject(String color, boolean filled) {
this.color = color;
this.filled = filled;
}
/** Return color */
public String getColor() {
return color;
}
/** Set a new color */
public void setColor(String color) {
this.color = color;
}
/** Return filled. Since filled is boolean,
so, the get method name is isFilled */
public boolean isFilled() {
return filled;
}
/** Set a new filled */
public void setFilled(boolean filled) {
this.filled = filled;
}
/** Abstract method findArea */
public abstract double findArea();
/** Abstract method findPerimeter */
public abstract double findPerimeter();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -