2段階目

This commit is contained in:
m-shimizu
2026-09-16 16:47:52 +09:00
parent 86a51ddb8e
commit ba035d4a3c
5 changed files with 51 additions and 5 deletions

View File

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