9/16のミッション課題1~3です

This commit is contained in:
2026-09-16 15:01:43 +09:00
parent 75eb127faa
commit ff69e07219
8 changed files with 92 additions and 0 deletions

16
em-oop/src/Rectangle.java Normal file
View File

@@ -0,0 +1,16 @@
public class Rectangle extends Shape {
private double width;
private double height;
public Rectangle(double width, double height) {
super("四角形");
this.width = width;
this.height = height;
}
@Override
public double area() {
return width * height;
}
}