﻿namespace P01Shapes
{
    using System;

    public class ShapesFactory
    {
        public static void Main()
        {
            Shape[] shapesCollection = new Shape[]
            {
                new Square(2, 2),
                new Rectangle(4.5, 2),
                new Square(5.2, 5.2),
                new Triangle(5, 10),
                new Triangle(1.5, 2),
                new Rectangle(10, 25.5)
            };

            foreach (var shape in shapesCollection)
            {
                Console.WriteLine(shape.CalculateSurface());
            }
        }
    }
}