/** Un triángulo dado por su base y su altura. Es el subtipo que se agregó al final. */
public record Triangle(double base, double height) implements Shape {
    public Triangle {
        if (base <= 0 || height <= 0) {
            throw new IllegalArgumentException("base o altura no positiva");
        }
    }
}
