static string [] foodID = { "CF001", "CF002" , "CF003" , "CF004" , "DE001" , "DE002","DE003", "BE001", "BE002", "BE003" };
static string [] name = { "Espresso" , "Cappuccino" , "Americano" , "Lattee" , "Nutella jar" , "Cheesecake" , "Molten cake" , "Red mojito" , "Mango milkhake" , "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 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(i+1 + " → " + "{0, 5} {1, 7:0.000} {2, -5} {3, -10}", foodID[i], price[i] , "BD" , quantity[i]);
Console.WriteLine(" \n0 to checkout");
Console.WriteLine("00 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" , "Lattee" , "Nutella jar" , "Cheesecake" , "Molten cake" , "Red mojito" , "Mango milkhake" , "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 = { 20 , 16 , 10 , 25 , 15 , 21 , 23, 9 , 13 , 7 };
string [] category = { "Coffee", "Coffee" , "Coffee" , "Coffee" , "Dessert" , "Dessert" , "Dessert" , "Drink" , "Drink" , "Drink" };
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 Suggestions");
Console.WriteLine("Press 7 for Assessing");
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(" - ");
Console.WriteLine("What is your suggestion?");
string suggestions = (Console.ReadLine());
Console.WriteLine("\nTHANK YOU for the suggestion, we'll take it into consideration.");
Console.WriteLine(" How do you rate our dealing with the customer out of ten? ");
double dealing = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(" How do you rate our food in terms of taste out of ten? ");
double FTaste = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(" How do you rate our food in terms of quality out of ten? ");
double FQuality = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(" How do you rate our speed in preparing your order out of ten? ");
double speed = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(" How do you rate cafe in general out of ten? ");
double inGeneral = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Rates out of ten: ");
Console.WriteLine("Dealing with customer: " + dealing);
Console.WriteLine("Food taste: " + FTaste);
Console.WriteLine("Food quality: " + FQuality);
Console.WriteLine("Speed in preparing orders: " + speed);
Console.WriteLine("Cafe in general in: " + inGeneral);
Console.WriteLine(" THANK YOU for rating ");
Console.WriteLine(" Sorry, Invalid option");