Example #1
0
        static void Main(string[] args)
        {
            AccountDetails customer1 = new SavingsAccount("Priyank", 1001, 1000.2);
            AccountDetails customer2 = new CurrentAccount("Priyank", 1001, 100.2);

            Printinfo(customer2);
            customer2.Deposit(100);

            Printinfo(customer2);
            customer2.Withdraw(7000);
            Printinfo(customer2);
        }
Example #2
0
        static void Main(string[] args)
        {
            Account acc1 = new SavingsAccount(11, "abc", 2000);
            Account acc2 = new CurrentAccount(12, "xyz", 3000);

            PrintDetails(acc1);
            acc1.Deposit(100);
            PrintDetails(acc1);
            acc1.Withdraw(200);
            PrintDetails(acc1);
            PrintDetails(acc2);
            acc2.Deposit(100);
            PrintDetails(acc2);
            acc2.Withdraw(5000);
            PrintDetails(acc2);
        }