public static void Main(string[] args) { var coffee = new Cream(new Caramel(new Cappichino())); System.Console.WriteLine(coffee.GetDescription()); System.Console.WriteLine(coffee.Cost()); var coffee1 = new Cream(new Cappichino()); System.Console.WriteLine(coffee1.GetDescription()); System.Console.WriteLine(coffee1.Cost()); var coffee2 = new Cappichino(); System.Console.WriteLine(coffee2.GetDescription()); System.Console.WriteLine(coffee2.Cost()); var coffee3 = new Caramel(new Cappichino()); System.Console.WriteLine(coffee3.GetDescription()); System.Console.WriteLine(coffee3.Cost()); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Beverage darkRost = new Cream(new Cream(new Cream(new Cream(new DarkRoast(Size.VENTI))))); Console.WriteLine($"{darkRost.GetDescription()} {darkRost.Cost()}"); // Beverage darkRoastTall = new DarkRoast(Size.TALL); // Console.WriteLine($"Cost of: {darkRoastTall.GetDescription()} {darkRoastTall.Cost()}"); // Beverage darkRoastSmall = new DarkRoast(Size.VENTI); // Console.WriteLine($"Cost of: {darkRoastSmall.GetDescription()} {darkRoastSmall.Cost()}"); // // Beverage darkRoast = new DarkRoast(Size.TALL); // Console.WriteLine($"Cost of: {darkRoast.GetDescription()} {darkRoast.Cost()}"); // darkRoast = new Cream(darkRoast); // Console.WriteLine($"Cost of: {darkRoast.GetDescription()} {darkRoast.Cost()}"); // darkRoast = new Cream(darkRoast); // Console.WriteLine($"Cost of: {darkRoast.GetDescription()} {darkRoast.Cost()}"); // darkRoast = new Mocha(darkRoast); // Console.WriteLine($"Cost of: {darkRoast.GetDescription()} {darkRoast.Cost()}"); // darkRoast = new Discount(10, darkRoast); // Console.WriteLine($"Cost of: {darkRoast.GetDescription()} {darkRoast.Cost()}"); }