2段階目終わりました

This commit is contained in:
2026-09-16 13:48:36 +09:00
parent 101991f33d
commit fd770903e4
5 changed files with 48 additions and 7 deletions

View File

@@ -1,16 +1,15 @@
public class Shape {
public abstract class Shape {
private String name;
public Shape(String name) {
this.name = name;
}
public double area() {
return 0.0;
}
public abstract double area();
public void showInfo() {
System.out.println(this.name + "の面積は" + this.area() + "です");
}
}