Ejemplo n.º 1
0
        /// <summary>
        /// The main.
        /// </summary>
        public static void Main()
        {
            Beverage drink1 = new HouseBlend(SizeType.Venti);

            Console.WriteLine(drink1.Description);
            Console.WriteLine("$ " + drink1.Cost);
            drink1 = new Mocha(new Mocha(drink1));
            drink1 = new Soymilk(drink1);
            Console.WriteLine(drink1.Description);
            Console.WriteLine("$ " + drink1.Cost);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            Console.WriteLine(beverage.getDescription() + " $ " + beverage.cost());
            Beverage beverage2 = new HouseBlend();

            Console.WriteLine(beverage2.getDescription() + " $ " + beverage2.cost());
            beverage2 = new Mocha(beverage2);
            Console.WriteLine(beverage2.getDescription() + " $ " + beverage2.cost());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Beverage beverage = new Expresso();

            beverage.Size = BeverageSize.TALL;
            System.Console.WriteLine(beverage.GetDescription());
            System.Console.WriteLine(beverage.Cost());
            System.Console.WriteLine("\n");
            beverage = new Mocha(beverage);
            System.Console.WriteLine(beverage.GetDescription());
            System.Console.WriteLine(beverage.Cost());
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            PrintMsg(beverage);



            Beverage beverage1 = new HouseBlend();

            beverage1 = new Mocha(beverage1);
            beverage1 = new Whip(beverage1);
            beverage1 = new Soy(beverage1);

            PrintMsg(beverage1);
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            Beverage beverage1 = new Espresso();

            Console.WriteLine("Description is: " + beverage1.getDescription());
            Console.WriteLine("Cost is: " + beverage1.cost());

            Console.WriteLine("---------------------------------------------------------");

            Beverage beverage2 = new HouseBend();

            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Soy(beverage2);
            Console.WriteLine("Description is: " + beverage2.getDescription());
            Console.WriteLine("Cost is: " + beverage2.cost());
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            Beverage objBeverage = new Espresso();

            Console.WriteLine(objBeverage.Description + " $" + objBeverage.Cost());

            Beverage objDarkRoast = new DarkRoast();

            objDarkRoast = new Mocha(objDarkRoast);
            objDarkRoast = new Mocha(objDarkRoast);
            objDarkRoast = new Whip(objDarkRoast);
            Console.WriteLine(objDarkRoast.Description + " $" + objDarkRoast.Cost());

            Beverage objHouseBlend = new HouseBlend();

            objHouseBlend = new Soy(objHouseBlend);
            objHouseBlend = new Mocha(objHouseBlend);
            objHouseBlend = new Whip(objHouseBlend);
            Console.WriteLine(objHouseBlend.Description + " $" + objHouseBlend.Cost());

            Console.ReadKey();
        }