static void Main(string[] args) { PizzaStore nystore = new NYPizzaStore(); Pizza pizza = nystore.orderPizza("cheese"); Console.WriteLine("You ordered a " + pizza.getName()+"\n"); //Preparing NYCheesePizza, cutting diagonal slices, you ordered a NYCheesePizza pizza = nystore.orderPizza("meat"); Console.WriteLine("You ordered a " + pizza.getName() + "\n"); //Preparing NYMeatPizza, cutting square slices, you ordered a NYMeatPizza PizzaStore chstore = new CHPizzaStore(); pizza = chstore.orderPizza("cheese"); Console.WriteLine("You ordered a " + pizza.getName() + "\n"); //Preparing CHCheesePizza, cutting diagonal slices, you ordered a CHCheesePizza string z = Console.ReadLine(); }
static void Main(string[] args) { PizzaStore nystore = new NYPizzaStore(); nystore.OrderPizza("clam"); /* Preparing New York Style Clam Pizza * Bake for 25 minutes at 350 * Cutting the pizza into diagonal slices * Place pizza in official PizzaStore box */ Console.WriteLine(nystore.OrderPizza("clam").Name); /* Preparing New York Style Clam Pizza * Bake for 25 minutes at 350 * Cutting the pizza into diagonal slices * Place pizza in official PizzaStore box * New York Style Clam Pizza (This is the additional line) * To just get the previous line, you can do this * Pizza pizza=nystore.OrderPizza("clam"); writeLine(pizza.Name); */ string z = Console.ReadLine(); }