上传了实验六,已确认无敏感信息

This commit is contained in:
2024-06-10 16:45:13 +08:00
parent 9e11c4db21
commit 265ae65068
8 changed files with 395 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
//Rectangle.java
package task4;
public class Rectangle {
double length;
double width;
public double getPerimeter() {
return (this.length + this.width) * 2;
}
public double getArea() {
return this.length * this.width;
}
public Rectangle(double length, double width) {
this.length = length;
this.width = width;
}
public Rectangle() {
this(1.0, 1.0);
}
}