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.
22 lines
703 B
22 lines
703 B
package com.rental.shape;
|
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println("========== 图形面积计算器测试 ==========\n");
|
|
|
|
Circle circle = new Circle(5);
|
|
System.out.println("--- 圆形测试 ---");
|
|
ShapeUtil.printArea(circle);
|
|
|
|
Rectangle rectangle = new Rectangle(4, 6);
|
|
System.out.println("--- 矩形测试 ---");
|
|
ShapeUtil.printArea(rectangle);
|
|
|
|
Triangle triangle = new Triangle(8, 5);
|
|
System.out.println("--- 三角形测试 ---");
|
|
ShapeUtil.printArea(triangle);
|
|
|
|
System.out.println("========== 测试完成 ==========");
|
|
}
|
|
}
|
|
|