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.
14 lines
363 B
14 lines
363 B
package shiyan2;
|
|
|
|
// Test.java
|
|
public class Test {
|
|
public static void main(String[] args) {
|
|
Shape circle = new Circle(3);
|
|
Shape rectangle = new Rectangle(4, 5);
|
|
Shape triangle = new Triangle(6, 7);
|
|
|
|
ShapeUtil.printArea(circle);
|
|
ShapeUtil.printArea(rectangle);
|
|
ShapeUtil.printArea(triangle);
|
|
}
|
|
}
|