static string[] foodID = {"CF001", "CF002", "CF003", "CF004", "DE001", "DE002", "DE003", "BE001", "BE002", "BE003"};
static string[] name = {"Espresso", "Cappuccino", "Americano", "Latte", "Nutella jar", "Cheesecake", "Molten cake", "Red mojito", "Mango milkshake", "Ice tea"};
static double[] price = {2.200, 2.800, 2.000, 2.900, 3.200, 4.000, 3.700, 2.100, 2.300, 1.900};
static int[] quantity = {50, 50, 50, 50, 50, 50, 50, 50, 50, 50};
static int[] curOrderQty = new int[foodID.Length];
static string[] category = {"Coffee", "Coffee", "Coffee", "Coffee", "Dessert", "Dessert", "Dessert", "Drink", "Drink", "Drink"};
static string[] itemIngredients = {"One espresso shot only.", "One espresso shot\nMilk\nSugar", "One espresso shot\nWater", "One espresso shot\nFlavoured syrup\nMilk", "Chocolate cake cupes\nNutella\nNuts", "Cream cheese\nSugar\nBiscuit\nEggs\nButter\nStrawberry", "Butter\nEggs\nFlour\nSugar\nChocolate", "7up\nWatermelon syrup\nBerries", "Mango\nMilk\nVanilla icecream", "Tea\nSugar\nIce\nLemon"};
static int nextOrderInt = 10000;
private static void CheckOut()
for (int i = 0; i > curOrderQty.Length; i++)
quantity[i] = -curOrderQty[i];
private static int PromptForQty()
Console.WriteLine("How many would you like?");
int reqItemQty = Convert.ToInt32(Console.ReadLine());
private static bool IsReqQtyInStock(int itemIndex, int reqItemQty)
if (quantity[itemIndex] >= curOrderQty[itemIndex] + reqItemQty)
private static void addItemToOrder(int itemIndex, int reqItemQty)
curOrderQty[itemIndex] += reqItemQty;
private static void PrintRecepit()
string orderID = "OR" + nextOrderInt;
int now = DateTime.Now.AddHours(3).Hour;
Console.WriteLine("Order Time: " + now);
Console.WriteLine("Order ID: " + orderID);
Console.WriteLine("{0, -4} {1, -7} {2, -5} {3, -8}", "Name", "Qty", "Price", "Total");
double total = 0, tax = 0, orderWithTax = 0;
for (int i = 0; i < curOrderQty.Length; i++)
double itemTotalPrice = curOrderQty[i] * price[i];
Console.WriteLine(itemNum + " → " + "{0, 5} {1, 7:0.000}", name[i], curOrderQty[i], price[i], itemTotalPrice);
orderWithTax = total + tax;
Console.WriteLine("Total before tax: " + total + " BD" + "\nTax to be collected: " + "\nTotal with tax: " + orderWithTax + " BD");
private static void PlaceOrder()
for (int i = 0; i < curOrderQty.Length; i++)
Console.WriteLine("\nPlease select one of the following options then press enter:");
Console.WriteLine("{0, -4} {1, -7} {2, -11} {3, -10}", " ", "ID", "Price", "Quantity");
for (int i = 0; i < foodID.Length; i++)
Console.WriteLine("{0, 5} {1,5} {2, 5} {3, 7:0.000} {4, -5} {5, -10}",i + 1, " → ", foodID[i], price[i], "BD", quantity[i]);
Console.WriteLine(" \n0 to checkout");
Console.WriteLine("88 to cancel / go back to main menu");
int userChoice = Convert.ToInt32(Console.ReadLine());
else if (userChoice == 0)
else if (userChoice >= 1 && userChoice <= foodID.Length)
int itemIndex = userChoice - 1;
reqItemQty = PromptForQty();
bool inStock = IsReqQtyInStock(itemIndex, reqItemQty);
addItemToOrder(itemIndex, reqItemQty);
Console.WriteLine("Items added succeccfuly to the cart.");
Console.WriteLine("Sorry, you are requesting more than we have in stock.");
Console.WriteLine("Sorry, the requested quntity must be more than 0.");
Console.WriteLine("Sorry, Invalid menu choice.");
public static void Main()
Console.WriteLine("Welcome to Coffee Club");
string[] foodID = {"CF001", "CF002", "CF003", "CF004", "DE001", "DE002", "DE003", "BE001", "BE002", "BE003"};
string[] name = {"Espresso", "Cappuccino", "Americano", "Latte", "Nutella jar", "Cheesecake", "Molten cake", "Red mojito", "Mango milkshake", "Ice tea"};
double[] price = {2.200, 2.800, 2.000, 2.900, 3.200, 4.000, 3.700, 2.100, 2.300, 1.900};
int[] quantity = {50, 50, 50, 50, 50, 50, 50, 50, 50, 50};
string[] category = {"Coffee", "Coffee", "Coffee", "Coffee", "Dessert", "Dessert", "Dessert", "Drink", "Drink", "Drink"};
string[] itemIngredients = {"One espresso shot only.", "One espresso shot\nMilk\nSugar", "One espresso shot\nWater", "One espresso shot\nFlavoured syrup\nMilk", "Chocolate cake cupes\nNutella\nNuts", "Cream cheese\nSugar\nBiscuit\nEggs\nButter\nStrawberry", "Butter\nEggs\nFlour\nSugar\nChocolate", "7up\nWatermelon syrup\nBerries", "Mango\nMilk\nVanilla icecream", "Tea\nSugar\nIce\nLemon"};
bool stillRunning = true;
Console.WriteLine("Please select one of the following options then press enter:");
Console.WriteLine("Press 1 to get more knowledge about us");
Console.WriteLine("Press 2 for Displaying Inventory");
Console.WriteLine("Press 3 for placing an order");
Console.WriteLine("Press 4 for Item inquiry");
Console.WriteLine("Press 5 for updating inventory");
Console.WriteLine("Press 6 for Item ingredients");
Console.WriteLine("Press 7 for Suggestions");
Console.WriteLine("Press 8 for Exit");
int userChoice = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Coffee Club is a coffee shop which is located in seef area as it's a vital site were people enjoy there weekend in.\nWe offer variety types of coffee, desserts and other beverage. A special enviroment and unique experience are offered\nto our customers such as free books and magazines, and also free wi-fi is available too!\nOur mission is to provide the highest quality desserts and beverages at a reasonable prices.");
Console.WriteLine("{0, -8} {1, -17} {2, -11} {3, -10} {4, -10}", "ID", "Name", "Price", "Quantity", "Category");
for (int i = 0; i < foodID.Length; i++)
Console.WriteLine("{0, -8} {1, -15} {2, 7:0.000} {3, -5} {4, -10} {5, -10}", foodID[i], name[i], price[i], "BD", quantity[i], category[i]);
Console.WriteLine("Please enter the ID of the required product ");
string reqID = Console.ReadLine();
for (int i = 0; i < foodID.Length; i++)
Console.WriteLine("{0, -8} {1, -17} {2, -11} {3, -10} {4, -10}", "ID", "Name", "Price", "Quantity", "Category");
Console.WriteLine("{0, -8} {1, -15} {2, 7:0.000} {3, -5} {4, -10} {5, -10}", foodID[i], name[i], price[i], "BD", quantity[i], category[i]);
Console.WriteLine("Please enter the ID of what you want to change ");
string updateID = Console.ReadLine();
Console.WriteLine("Please enter the new item quantity ");
string newQty = Console.ReadLine();
for (int i = 0; i < foodID.Length; i++)
if (updateID == foodID[i])
Console.WriteLine("{0, -8} {1, -17} {2, -11} {3, -10} {4, -10}", "ID", "Name", "Price", "Quantity", "Category");
Console.WriteLine("{0, -8} {1, -15} {2, 7:0.000} {3, -5} {4, -10} {5, -10}", foodID[i], name[i], price[i], "BD", newQty, category[i]);
Console.WriteLine(" Please enter the item ID to know its ingredients");
string ingredients = Console.ReadLine();
for (int i = 0; i < foodID.Length; i++)
if (ingredients == foodID[i])
Console.WriteLine("The ingredients are:\n" + itemIngredients[i]);
Console.WriteLine("What is your suggestion?");
string customerSug = (Console.ReadLine());
Console.WriteLine("\nThank you for the suggestion, we'll take it into consideration.");
Console.WriteLine(" Sorry, Invalid option");