package MyFigures;

public class MyTrapezium extends Figure{

    private Double sideA;
    private Double sideB;
    private Double sides;
    private Double height;

    public MyTrapezium(Double sideA, Double sideB,Double sides ,Double height){
        this.sideA = sideA;
        this.sideB = sideB;
        this.sides = sides;
        this.height = height;
    }

    @Override
    public Double calculatePerimeter() {
        return sideA + sideB + sides * 2;
    }

    @Override
    public Double calculateSpace() {
        return (sideA + sideB) * height / 2 ;
    }
}
