定义figure

public abstract class Figure {
private Point start;
private Point end;
private Color color;
public abstract void drow();
public Point getStart() {
return start;
}
public void setStart(Point start) {
this.start = start;
}
public Point getEnd() {
return end;
}
public void setEnd(Point end) {
this.end = end;
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
public double area() {
return 0;
}

}

上一篇:【Rust】结构体


下一篇:Rust 泛型