public static int MenuChoice()
Console.WriteLine("Welcome to the World's Best Tea Shop");
Console.WriteLine("\t 1. Process a Single Order ");
Console.WriteLine("\t 2. Process Multiple Orders From a File");
Console.WriteLine("\t 3. Quit");
Console.WriteLine("\t Enter Menu Choice (1, 2, or 3): ");
menuChoice = Convert.ToInt32(Console.ReadLine());
if (menuChoice == 1 || menuChoice == 2 || menuChoice == 3)
Console.WriteLine("\nERROR: INVALID MENU OPTION CHOSEN. TRY AGAIN.");
public static int TeaChoice()
Console.WriteLine("\t 1 - Plain Tea");
Console.WriteLine("\t 2 - Black Tea");
Console.WriteLine("\t 3 - Green Tea");
Console.WriteLine("\t 4 - White Tea");
Console.WriteLine("\t Enter Choice of Tea: ");
teaType = Convert.ToInt32(Console.ReadLine());
if (teaType == 1 || teaType == 2 || teaType == 3 || teaType == 4)
Console.WriteLine("\nERROR: INVALID MENU OPTION CHOSEN. TRY AGAIN.");
public static int TeaSize()
Console.WriteLine("Select a Size: ");
Console.WriteLine("\t 1 - Small (8 oz) ");
Console.WriteLine("\t 2 - Medium (16 oz) ");
Console.WriteLine("\t 3 - Large (24 oz) ");
Console.WriteLine("\t Enter Choice of Size: ");
Console.Write("\t Select a Size: ");
size = Convert.ToInt32(Console.ReadLine());
if (size == 1 || size == 2 || size == 3)
Console.WriteLine("\nERROR: INVALID MENU OPTION CHOSEN. TRY AGAIN.");
public static void Main()
const double plain = 0.43;
const double black = 0.53;
const double green = 0.65;
const double white = 0.78;
const decimal tax = .045m;
string fileName = "orders.txt";
menuChoice = MenuChoice();
Console.WriteLine("Enter the name of the customer: ");
string name = Console.ReadLine();
Console.WriteLine("Name on order: " + name);
price = (decimal)(plain * 8.0);
price = (decimal)(plain * 16.0);
price = (decimal)(plain * 24.0);
price = (decimal)(black * 8.0);
price = (decimal)(black * 16.0);
price = (decimal)(black * 24.0);
price = (decimal)(green * 8.0);
price = (decimal)(green * 16.0);
price = (decimal)(green * 24.0);
price = (decimal)(white * 8.0);
price = (decimal)(white * 16.0);
price = (decimal)(white * 24.0);
total = price * salesTax;
Console.WriteLine("\nName on order: {0}", name);
Console.WriteLine("Price of Tea: {0}", price.ToString("c"));
Console.WriteLine("Sales Tax: {0}", salesTax.ToString("c"));
Console.WriteLine("Order Total: {0}", total.ToString("c"));
else if (menuChoice == 2)
StreamReader sr = new StreamReader(fileName);
teaChoice = int.Parse(sr.ReadLine());
teaSize = int.Parse(sr.ReadLine());
prices = teaChoice * teaSize;
orderTotal = prices * saleTax;
Console.WriteLine("\nName on order: {0}", names);
Console.WriteLine("Price of Tea: {0}", prices.ToString("c"));
Console.WriteLine("Sales Tax: {0}", saleTax.ToString("c"));
Console.WriteLine("Order Total: {0}", orderTotal.ToString("c"));
else if (menuChoice == 3)