第一段階完了しました。

This commit is contained in:
s-ohasi
2026-09-16 16:35:38 +09:00
parent 542af2a5d4
commit 48af3a3a99
3 changed files with 62 additions and 0 deletions

22
em-oop/src/Shape.java Normal file
View File

@@ -0,0 +1,22 @@
public class Shape {
//フィールド作成
private String name;
//コンストラクタ作成
public Shape(String name) {
}
//メソッド作成
double area() {
return 0.0;
}
//メソッド作成
void showInfo() {
//出力
System.out.println(this.name + "の面積は" + this.area() + "です");
}
}