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.
12 lines
381 B
12 lines
381 B
public class Main {
|
|
public static void main(String[] args) {
|
|
Shape circle = new Circle(5);
|
|
Shape rectangle = new Rectangle(4, 6);
|
|
Shape triangle = new Triangle(3, 8);
|
|
|
|
System.out.println("=== 图形面积计算器 ===");
|
|
ShapeUtil.printArea(circle);
|
|
ShapeUtil.printArea(rectangle);
|
|
ShapeUtil.printArea(triangle);
|
|
}
|
|
}
|
|
|