Exemplo n.º 1
0
        public static void Main()
        {
            var product1 = new Product(4.52m);
            var product2 = new FeaturedProduct(3.99m);

            var products = new List <Product>();

            products.Add(product1);
            products.Add(product2);

            foreach (Product product in products)
            {
                product.Render();
            }


            Console.WriteLine("FINISHED......press any key");
            Console.ReadKey();
        }
Exemplo n.º 2
0
        public static void Main()
        {
            var product1 = new StandardProduct(4.52m);
            var product2 = new FeaturedProduct(3.99m);
            var product3 = new SpecialProduct(22.55m);

            var products = new List<Product>();

            products.Add(product1);
            products.Add(product2);
            products.Add(product3);

            foreach (Product product in products)
            {
                product.Render();
            }

            Console.WriteLine("FINISHED......press any key");
            Console.ReadKey();
        }