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.
13 lines
292 B
13 lines
292 B
public class Main {
|
|
public static void drawShape(Shape s) {
|
|
s.draw();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Shape circle = new Circle();
|
|
Shape rectangle = new Rectangle();
|
|
|
|
drawShape(circle);
|
|
drawShape(rectangle);
|
|
}
|
|
}
|
|
|