📄 graphicobject.java
字号:
/**
*
* @author 07301048
* base class GraphicObject ,which contains abstract method that should be implemented
*in derived class
*/
public abstract class GraphicObject {
/**
* common attributes that all graphic have
*/
private String lineColor;
private String fillColor;
GraphicObject(){
lineColor = "black";
fillColor = "white";
}
GraphicObject(String lineColor, String fillColor){
this.lineColor = lineColor;
this.fillColor = fillColor;
}
public String getColorOfLine(){
return lineColor;
}
public String getFillcolor(){
return fillColor;
}
/**
* method rotate() rotate the graphic 90 degrees
* method draw() draw the shape of the graphic
*/
public abstract void rotate();
public abstract void draw();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -