This commit is contained in:
louiscklaw
2025-01-31 19:15:17 +08:00
parent 09adae8c8e
commit 6c60a73f30
1546 changed files with 286918 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
public class TestShape {
public static void main(String[] args) { // line 14
Shape s1 = new Square("Square1", 4); // line 15
Shape s2 = new Circle("Circle1", 2); // line 16
System.out.println("Area of circle: " + s2.area()); // line 17
System.out.println("Area of square: " + s1.area()); // line 18
}
}