Exemple #1
0
 public void menu()
 {
     do
     {
         System.Console.WriteLine("\n\nLets add some toppings to your " + size.returnSize() + " " + crust.returnCrust() + " Pizza!\nYou currently have: ");
         foreach (string s in pizTopList)
         {
             System.Console.Write(s + ", ");
         }
         System.Console.WriteLine("\nYour current pizza will cost " + cost + " Would you like to: [a]dd a topping, [r]emove a topping, [f]inish current pizza.");
         choice = System.Console.ReadLine();
         choice = choice.ToLower();
         Thing();
     }while (choice != "f");
 }
Exemple #2
0
 public Pizza()
 {
     pizTopList.Add("peperoni");
     pizTopList.Add("bacon");
     cost        = 1.00m;
     toppingsMax = 2;
     crust       = new Crust();
     size        = new Size();
     cost        = cost + crust.returnCrustCost() + size.returnSizeCost();
     menu();
     System.Console.WriteLine("\n\n");
     System.Console.WriteLine("Your " + size.returnSize() + " " + crust.returnCrust() + " Pizzawith ");
     foreach (string s in pizTopList)
     {
         System.Console.Write(s + ", ");
     }
     System.Console.Write(" will be totaled at " + cost);
 }