public void Run() { vm.CreateUpdateVendingMachineInventory(); bool exit = false; while (!exit) //run this is an infinite loop. You'll need a 'finished' option and then you'll break after that option is selected { string selection = (string)ui.PromptForSelection(MAIN_MENU_OPTIONS); if (selection == MAIN_MENU_OPTION_DISPLAY_ITEMS)//presses 1 to display the items { vm.DisplayItems(); } else if (selection == MAIN_MENU_OPTION_PURCHASE)//presses 2 to purchase { PurchaseMenu(); } else if (selection == MAIN_MENU_OPTION_EXIT)//presses 3 to Exit { exit = true; } else if (selection == MAIN_MENU_OPTION_SALES_REPORT)//presses 4 to purchase { vm.WriteToTotalSalesReport(); } } }