package MyFigures;

public class MyRectangle extends Figure {

    public Double width;
    public Double height;

    public MyRectangle(Double width, Double height){
        this.width = width;
        this.height = height;
    }

    public Double getWidth() {
        return width;
    }

    public void setWidth(Double width) {
        this.width = width;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    @Override
    public Double calculatePerimeter() {
        return (width + height) * 2;
    }

    @Override
    public Double calculateSpace() {
        return width * height;
    }


}
