Day3 Stept2

This commit is contained in:
2026-09-16 13:33:37 +09:00
parent a9e99590ca
commit 67baf3374c
5 changed files with 61 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
package day3Keisho;
public class Rectangle extends Shape {
private double width;
private double height;
public Rectangle(double width,double height) {
super("四角形");
this.height=height;
this.width=width;
}
@Override
public double area() {
// TODO 自動生成されたメソッド・スタブ
//super.showInfo();
return width*height;
}
}