void CheckoutMenu() { //check if user is signed in? if (!session.IsLoggedIn()) { Console.WriteLine("Something must have gone wrong, returning to first menu..."); currentMenu = Menu.Welcome; return; } if (!session.StoreIsChosen()) { Console.WriteLine("Something must have gone wrong, returning to first menu..."); currentMenu = Menu.Welcome; return; } if (!session.ProductIsChosen()) { Console.WriteLine("Something must have gone wrong, returning to first menu..."); currentMenu = Menu.Welcome; return; } CartDisplay(); string checkoutIntro = ("\nWould you like to check out now?\n"); string[] checkoutOptions = { "Add More Items to Chart", "Empty Cart and Return To First Menu", "Confirm Checkout", "Exit" }; switch (ChooseOptionFromList(intro: checkoutIntro, options: checkoutOptions)) { //if sign-in is successful, move to main menu, otherwise, stay in sign in menu case 0: currentMenu = Menu.ViewProducts; break;//stays in current menu case 1: if (session.RemoveAllItemsFromCart()) { currentMenu = Menu.Main; } else { Console.WriteLine("Something must have gone wrong, returning to first menu..."); currentMenu = Menu.Welcome; return; } break; case 2: if (session.AttemptCheckout()) { Console.WriteLine($"Checkout successful! for a total of ${session.CartTotal()}, you purchased: things; check your order history for now.\n"); session.RemoveAllItemsFromCart(); currentMenu = Menu.Welcome; } else { Console.WriteLine("Something must have gone wrong, returning to first menu..."); currentMenu = Menu.Welcome; return; } break; case 3: Environment.Exit(0); break; } }