Esempio n. 1
0
        private static void SavingsMenu()
        {
            Console.WriteLine("Select action to do");
            Console.WriteLine("A: Deposit \n" +
                              "B: Withdrawl \n" +
                              "C: Close + Report \n" +
                              "R: Return to Bank Menu \n");
            string option = Console.ReadLine();

            option = option.ToUpper();

            switch (option.ToUpper())
            {
            case "A":
                Console.WriteLine("Enter Desired Deposit Amount :");
                IsNumber();
                double depositAmount;
                depositAmount = inputCoverter.ConvertedInputToNumeric(output);
                savings.MakeDeposit(depositAmount);
                SavingsMenu();
                break;

            case "B":
                Console.WriteLine("Enter Desired Withdrawl Amount :");
                IsNumber();
                double withdrawlAmount;
                withdrawlAmount = inputCoverter.ConvertedInputToNumeric(output);
                savings.MakeWithdrawl(withdrawlAmount);
                SavingsMenu();
                break;

            case "C":
                Console.WriteLine("Percentage Change: " + savings.GetPercentageChange() + "%");
                Console.WriteLine(savings.CloseAndReport());
                SavingsMenu();
                break;

            case "R":
                BankMenu(savings, chequings, globalSavingsAccount);
                break;

            default:
                Console.WriteLine("NOT VALID OPTION");
                SavingsMenu();
                break;
            }
        }