예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            SavingsAccount savings = new SavingsAccount(500.00M);

            savings.Deposit(100M);

            savings.Withdraw(50M);

            // Mess with checking

            CheckingAccount checking = new CheckingAccount();

            checking.Deposit(500M);

            checking.Withdraw(1000M);

            checking.Withdraw(100M);

            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            SavingAccount a = new SavingAccount("Meher", 100.00, 100005);

            Console.WriteLine("Saving Account");
            a.AddBalance(100);
            a.Interest();
            a.Withdraw(50.0);
            a.ShowBalance();

            CheckingAccount b = new CheckingAccount("Hridoy", 250.0, 500010);

            Console.WriteLine("Checking Account");
            b.AddBalance(600.0);
            b.OrderCheck();
            b.Withdraw(100.0);
            b.ShowBalance();
        }