コード例 #1
0
        static void Main(string[] args)
        {
            Triangle triangle = new Triangle(5, 3);
            Square   square   = new Square(5, 5);

            //Use a collection of Shape objects and display their dimensions and area.

            triangle.CalculateArea();
            triangle.DisplayShapeData();

            square.CalculateArea();
            square.DisplayShapeData();
        }