Esempio n. 1
0
        public static void Main(string[] args)
        {
            //TODO: Analyze the code repeatedly to fully understand all the OOP concepts used in it.

            var shapes = new Shape[] {
                new Rectangle (5, 2.5),
                new Square (10),
                new UnitSquare (),
                new Ellipse (11.2, 27.75),
                new Circle (15.6)
            };

            for (int i = 0; i < shapes.Length; i++)
                Console.WriteLine (shapes [i]);
        }