//Rectangle.java
package Task4;

public class Rectangle {
    public interface AreaRectangle {

    }

    private double x;
    private double y;

    public Rectangle(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double area() {
        return x * y;
    }

    public String toString() {
        return "该长方形面积为" + this.area();
    }
}