2段階目
This commit is contained in:
@@ -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() + "です");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user