public static void EshopDemo() { List <Variation> variations = new List <Variation>() { new ColorVariation(), new SizeVariation(), new FabricVariation() }; Console.WriteLine("Hello,What tshirt color u want?"); var colorInput = Console.ReadLine().Trim().ToUpper(); var color = SetColor(colorInput); Console.WriteLine("How about Size?"); var sizeInput = Console.ReadLine().Trim().ToUpper(); var size = SetSize(sizeInput); Console.WriteLine("Material?"); var fabricInput = Console.ReadLine().Trim().ToUpper(); var fabric = SetFabric(fabricInput); Console.WriteLine("Choose Payment Method 1) Credit Card 2) Cash 3) Bank Transfer"); var paymentInput = Convert.ToInt32(Console.ReadLine().Trim()); var tShirt = new TShirt(color, size, fabric); var eshop = new Eshop(); eshop.SetVariationStrategy(variations); eshop.SelectPaymentMethod(paymentInput); eshop.PayTShirt(tShirt); }
static void Main(string[] args) { IEnumerable <Variation> variations = new List <Variation>() { new ColorVariation(), new SizeVariation(), new FabricVariation() }; var Tshirt = CustomerInteraction.TshirtCreation(); var paymentInput = CustomerInteraction.PaymentPreference(); var eshop = new Eshop(); eshop.SelectVariationMethod(variations); eshop.SelectPaymentMethod(paymentInput); eshop.PayTShirt(Tshirt); }