Beispiel #1
0
        public static decimal CalculateArea(decimal length, decimal width, decimal height, _3DBases b)
        {
            switch (b)
            {
            case _3DBases.Square:
                return(Square.CalculateArea(length) + (0.5m * Square.CalculatePerimeter(length) * Right_AngledTriangle.CalculateHypotenuse(height, 0.5m * length)));

            case _3DBases.Triangle:
                return(EquilateralTriangle.CalculateArea(length, width) + (0.5m * EquilateralTriangle.CalculatePerimeter(width) * Right_AngledTriangle.CalculateHypotenuse(width, height)));

            default:
                return(123456m);
            }
        }