public static void SavingsMenu() { bool errmenu = true; do { try { SavingsAccount savings = new SavingsAccount(5, 1.00); StringBuilder sb = new StringBuilder(); sb.Append("Savings Menu\n"); sb.Append("A. Deposit\n"); sb.Append("B. Withdrawal\n"); sb.Append("C. Close + Report\n"); sb.Append("R. Return to Bank Menu\n"); Console.WriteLine(sb.ToString()); string sinput = Console.ReadLine().ToUpper(); switch (sinput) { case "A": bool depositerror = true; do { try { Console.WriteLine("Please enter the deposit amount:"); string deposit = Console.ReadLine(); bool validdeposit = Double.TryParse(deposit, out double depositvalue); if (validdeposit) { savings.MakeDeposit(depositvalue); } else { throw new NumberValueException("\"" + deposit + "\" is not a numeric value."); } depositerror = false; } catch (NumberValueException nex) { Console.WriteLine(nex.Message); depositerror = true; } } while (depositerror); break; case "B": bool withdrawalerror = true; do { try { Console.WriteLine("Please enter the withdrawal amount:"); string withdrawal = Console.ReadLine(); bool validwithdrawal = Double.TryParse(withdrawal, out double withdrawalvalue); if (validwithdrawal) { savings.MakeDeposit(withdrawalvalue); } else { throw new NumberValueException("\"" + withdrawal + "\" is not a numeric value."); } withdrawalerror = false; } catch (NumberValueException nex) { Console.WriteLine(nex.Message); withdrawalerror = true; } } while (withdrawalerror); break; case "C": savings.CloseAndReport(); break; case "R": MainMenu(); break; default: throw new IllegalSavingsMenuOptionException("Unkown option \"" + sinput + "\""); } } catch (IllegalSavingsMenuOptionException ex) { Console.WriteLine(ex.Message); } } while (errmenu); }