Esempio n. 1
0
        static void TestAccountv3()
        {
            Accountv3 account = new Accountv3("1234567890", "Test Account", 100000.00);

            //We now want to check the balance
            account.GetBalance();
            //We can now debit and credit the account and the account will handle it's properties
            account.CreditAccount(1000);
            account.DebitAccount(1000);
        }
Esempio n. 2
0
        static bool Deposit(Accountv3 acc)
        {
            Console.WriteLine("How much would you like to Deposit");
            double amt = 0.00;

            try
            {
                double.TryParse(Console.ReadLine(), out amt);
                acc.CreditAccount(amt);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }