예제 #1
0
        private static void BuildSmallCake()
        {
            Cake smallCake = new SmallCake();
            smallCake = new Icing(smallCake);

            Console.WriteLine(smallCake.GetDescription());
            Console.WriteLine("{0:C2}", smallCake.CalculateCost());
        }
예제 #2
0
        private static void BuildMediumCake()
        {
            Cake mediumCake = new MediumCake();
            mediumCake = new Icing(mediumCake);
            mediumCake = new Cherries(mediumCake);

            Console.WriteLine(mediumCake.GetDescription());
            Console.WriteLine("{0:C2}", mediumCake.CalculateCost());
        }
예제 #3
0
        private static void BuildSmallCake()
        {
            Cake smallCake = new SmallCake();

            smallCake = new Icing(smallCake);

            Console.WriteLine(smallCake.GetDescription());
            Console.WriteLine("{0:C2}", smallCake.CalculateCost());
        }
예제 #4
0
        private static void BuildLargeCake()
        {
            Cake largeCake = new LargeCake();
            largeCake = new Icing(largeCake);
            largeCake = new Cherries(largeCake);
            largeCake = new ChocolateChips(largeCake);

            Console.WriteLine(largeCake.GetDescription());
            Console.WriteLine("{0:C2}", largeCake.CalculateCost());
        }
예제 #5
0
        private static void BuildMediumCake()
        {
            Cake mediumCake = new MediumCake();

            mediumCake = new Icing(mediumCake);
            mediumCake = new Cherries(mediumCake);

            Console.WriteLine(mediumCake.GetDescription());
            Console.WriteLine("{0:C2}", mediumCake.CalculateCost());
        }
예제 #6
0
        private static void BuildLargeCake()
        {
            Cake largeCake = new LargeCake();

            largeCake = new Icing(largeCake);
            largeCake = new Cherries(largeCake);
            largeCake = new ChocolateChips(largeCake);

            Console.WriteLine(largeCake.GetDescription());
            Console.WriteLine("{0:C2}", largeCake.CalculateCost());
        }