public static void Main() { var macchiato = CoffeeFactory.GetCoffee(CoffeeType.Macchiato); var regularCoffee = CoffeeFactory.GetCoffee(CoffeeType.Regular); Console.WriteLine($"Macchiato - Milk content: {macchiato.MilkContent} ml, Coffee content: {macchiato.CoffeeContent} ml"); Console.WriteLine($"Regular coffee - Milk content: {regularCoffee.MilkContent} ml, Coffee content: {regularCoffee.CoffeeContent} ml"); }
public static void Main() { var macchiato = CoffeeFactory.CreateCoffee(CoffeeType.Macchiato); var regularCoffee = CoffeeFactory.CreateCoffee(CoffeeType.Regular); Console.WriteLine("Macchiato >> Milk content: {0} ml, Coffee content: {1} ml", macchiato.MilkContent, macchiato.CoffeeContent); Console.WriteLine("Regular coffee >> Milk content: {0} ml, Coffee content: {1} ml", regularCoffee.MilkContent, regularCoffee.CoffeeContent); }