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.
19 lines
584 B
19 lines
584 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("Circle:");
|
|
ShapeUtil.printArea(circle);
|
|
ShapeUtil.drawShape(circle);
|
|
|
|
System.out.println("Rectangle:");
|
|
ShapeUtil.printArea(rectangle);
|
|
ShapeUtil.drawShape(rectangle);
|
|
|
|
System.out.println("Triangle:");
|
|
ShapeUtil.printArea(triangle);
|
|
ShapeUtil.drawShape(triangle);
|
|
}
|
|
}
|
|
|