⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphicobject.java

📁 第四次作业 1、 创建一个Animal(动物)类
💻 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 + -