📄 circle.java
字号:
public class Circle extends GraphicObject {
/**
* specific attributes Circle has
* center and radius
*/
private Point center;
private double radius;
/**
* constructor that inherits from base class GraphicObject
* and initial the attributes added
*/
Circle(){
super();
center = new Point(0,0);
radius = 1;
}
Circle(String lineColor,String fillColor,Point center,double radius){
super(lineColor,fillColor);
this.center = center;
this.radius = radius;
}
@Override
public void draw() {
// TODO Auto-generated method stub
System.out.println("Draw the center of the Circle is x = " + center.getX()+"y = "+center.getY()
+"color of the line is "+super.getColorOfLine()+"fillcolor is "+super.getFillcolor());
}
@Override
public void rotate() {
// TODO Auto-generated method stub
System.out.println("rotate this circle");
draw();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -