public static void Main(string[] args) { Console.WriteLine(" Welcome to the Wag Corp's Gadgets & Widgets online shop..."); Console.WriteLine(" Where all your gadget and widget needs are met!"); Console.WriteLine(" "); Console.WriteLine(" Please let us know if you would like to place a Gadget (G) or a Widget (W) order with us:"); char orderType = Convert.ToChar(Console.ReadLine().ToUpper()); if (orderType == 'G') { Console.WriteLine(" "); OrderFactory GadgetOrder = new GadgetOrderFactory(); GadgetOrder.Build(); } else if (orderType == 'W') { Console.WriteLine(" "); OrderFactory2 WidgetOrder2 = new WidgetOrderFactory2(); WidgetOrder2.Build2(); } else { Console.WriteLine(" "); Console.WriteLine(" You did not enter a valid option. Please start over."); Console.WriteLine(" "); } }
public static void Main(string[] args) { //Start page to find order type Console.WriteLine("Welcome to the Wag Corp's Gadgets & Widgets online shop!"); Console.Write("Where all your gadget and widget needs are met!"); Console.WriteLine(" "); Console.WriteLine("Please let us know if you would like to place a Gadget (1) or a Widget (2) order:"); int orderType = Convert.ToInt32(Console.ReadLine()); if (orderType == 1) { OrderFactory GadgetOrder = new GadgetOrderFactory(); GadgetOrder.Build(); } else if (orderType == 2) { OrderFactory WidgetOrder = new WidgetOrderFactory(); WidgetOrder.Build(); } else { Console.WriteLine("You did not enter a valid option. Please start over."); Console.WriteLine(" "); } }