Example #1
0
        static void Main(string[] args)
        {
            Account a0 = new Savings();

            Account a1 = new Savings("Hamim Hasan", 112233, 10000);

            SpecialSavings s1 = new SpecialSavings(20);

            Account a2 = new SpecialSavings("Arman Rahman", 445566, 20000, 20);

            Account a3 = new Fixed("Hamim Hasan", 813444, 8000);

            Account a4 = new Overdraft(1000);

            Overdraft od1 = new Overdraft("Hamim Hasan", 658233, 12066, 4000);
        }
Example #2
0
        static void Main(string[] args)
        {
            Account a1 = new Fixed("NISHI", "1", 10000, 2020, 5);
            Account a2 = new Savings("SAkIB", "2", 50000, 10);
            Account a3 = new SpecialSavings("NIDHI", "3", 20000, 5);
            Account a4 = new Overdraft("AKASH", "4", 150000, 20000);


            a1.Withdraw(500);
            a2.Withdraw(500);
            a3.Withdraw(500);
            a4.Withdraw(500);



            a1.Withdraw(5000);
            a2.Withdraw(40000);
            a3.Withdraw(6000);
            a4.Withdraw(10000);
        }
Example #3
0
        static void Main(string[] args)
        {
            SavingAccount s = new SavingAccount("Sadman", "101", 1000);

            s.Withdraw(800);
            FixedAccount f = new FixedAccount("Sadman", "102", 1000, 2022);

            f.Withdraw(200);
            SpecialSavings ss = new SpecialSavings("Sadman", "104", 1000, 2);

            ss.Withdraw(900);
            ss.Withdraw(200);
            ss.Withdraw(200);
            ss.Withdraw(200); // should exceed monthly limit
            Overdraft od = new Overdraft("Sadman", "101", 1000, 500);

            od.Withdraw(1200);
            od.Withdraw(100);
            od.Withdraw(300); // should exceed OVerhead limit
        }
Example #4
0
        static void Main(string[] args)
        {  //name,id,balance,monthly transaction
            Savings s = new Savings("Rakhi", 19399791, 12000, 4);

            s.Showinfo();
            s.withdrawing(500);
            Console.WriteLine();

            //name,id,balance,creat year,tenure
            Fixed f = new Fixed("Rahman", 19393421, 10000, 2018, 5);

            f.Showinfo();
            f.withdrawing(300);
            Console.WriteLine();

            //Not mature
            Fixed f1 = new Fixed("Tanusri", 765, 5000, 2017, 6);

            f1.Showinfo();
            f1.withdrawing(300);
            Console.WriteLine();

            SpecialSavings s1 = new SpecialSavings("Rakhi", 19399791, 12000, 4);

            s1.Showinfo();
            s1.withdrawing(500);
            Console.WriteLine();

            ///will not withdraw
            SpecialSavings s2 = new SpecialSavings("Karim", 19399821, 10000, 3);

            s2.Showinfo();
            s2.withdrawing(2000);
            Console.WriteLine();

            OverDraft o = new OverDraft("Karim", 19399821, 10000, 3);

            o.Showinfo();
            o.withdrawing(200);
            Console.WriteLine();
        }