public void put(DeliveryPizzaLib.Manager.Order order) { string[] pizzaSizes = { "S", "M", "L" }; double[] pizzaPrices = { 7.00, 8.00, 10.00 }; int x; double firstTotal; double grandTotal; double firstTotals; string[] pizzaTop = { "P", "O", "I", "B", "G" }; double[] topPrices = { 0, 50 }; int y; Console.WriteLine("Select your pizza size(Your choices are S, M or L)"); string userPizzaSize = Console.ReadLine(); Console.WriteLine("How many Pizzas would you like"); double numPizzas = Cnovert.ToDouble(console.ReadLine()); for (x = 0; x < pizzaSizes.Length; ++x) { if (userPizzaSize == pizzaSizes[x]) { firstTotal = numPizzas * pizzaPrices[x]; Console.WriteLine("You ordered {0} pizzas,numPizzas"); Console.WriteLine("Your total is {0:}", firstTotal); } } Console.WriteLine("Would you like any extra toppings for $0.50,", firstTotal); string top = Console.ReadLine(); if (top == "y") { Console.WriteLine("\n Our toppings are :\n"); Console.WriteLine("\n Select the first letter of your pizza toppings\n" + "(Your chjoices are P,O,I)"); string userPizza = Console.ReadLine(); Console.WriteLine("How many pizza toppings would you like?"); double numTop = Convert.ToDouble(Console.ReadLine()); for (y = 0; y < pizzaTop.Length; ++y) { if (userpizzaTop == pizzaTop[y]) { firstTotals = numTop * .50; firstTotal = numPizzas * pizzaPrices[x]; Console.WriteLine("You ordered {0}pizza topping.", numTop); grandTotal = firstTotals + firstTotal; Console.WriteLine("Your total will be {0:c}.", grandTotal); // stub } } } }
void IDatabase.put(DeliveryPizzaLib.Manager.Order order) { // stub }