You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
303 B
17 lines
303 B
abstract class Shape {
|
|
public abstract void draw();
|
|
}
|
|
|
|
class Circle extends Shape {
|
|
@Override
|
|
public void draw() {
|
|
System.out.println("绘制圆形");
|
|
}
|
|
}
|
|
|
|
class Rectangle extends Shape {
|
|
@Override
|
|
public void draw() {
|
|
System.out.println("绘制矩形");
|
|
}
|
|
}
|
|
|