Beispiel #1
0
        static void Main(string[] args)
        {
            BankAccount account1 = new BankAccount(1, "Vivek", "p@ss", 20000, 12);

            BankAccount account2 = new BankAccount(2, "Sanjay", "1234", 50000, 12);

            account1.Show();

            DoDeposit(account1, -1);
            DoDeposit(account1, 1000);

            DoWithdraw(account1, -1, "p@ss");
            DoWithdraw(account1, 1, "wrongpass");
            DoWithdraw(account1, 100000, "p@ss");
            DoWithdraw(account1, 1000, "p@ss");



            Console.WriteLine("Before Transfer Test");
            account1.Show();
            account2.Show();

            DoTransfer(account1, 100000, "p@ss", account2);

            DoTransfer(account1, 1000, "p@ss", account2);

            Console.WriteLine("After Transfer");
            Show(account1);
            Show(account2);
        }
        static void Main(string[] args)
        {
            BankAccount account1 = new BankAccount(1, "Vivek Mishra", "p@ss", 20000, 12);

            account1.Show();

            account1.Name = "Vivek Singh";

            account1.Show();

            account1.Name = "Shweta Mishra";
            account1.Show();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            BankAccount.InterestRate = 20;

            BankAccount account1 = new BankAccount("Vivek Mishra", "p@ss", 20000);
            BankAccount account2 = new BankAccount("Prabhat Singh", "p@ss", 20000);


            // account1.InterestRate = 20; //sets interst rate for account1. actually setting for every one

            account1.Show();
            account2.Show();

            BankAccount.Transfer(account1, "p@ss", 1000, account2);
            account1.Show();
            account2.Show();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            BankAccount account1 = new BankAccount(1, "Vivek Mishra", "p@ss", 20000, 12);
            BankAccount account2 = new BankAccount(1, "Prabhat Singh", "p@ss", 20000, 14);

            account1.Show();
            account2.Show();
        }
        static void Main(string[] args)
        {
            BankAccount account1 = new BankAccount(1, "Vivek", "p@ss", 20000, 12);

            BankAccount account2 = new BankAccount(2, "Sanjay", "1234", 50000, 12);

            account1.Show();
            account1.Deposit(-1);

            account1.Deposit(20000);
            account1.Withdraw(35000, "p@ss");
            account1.Withdraw(30000, "wrong-p@ss");
            account1.Withdraw(-1, "wrong-p@ss");
            account1.Withdraw(25000, "p@ss");

            Transfer(account1, 100000, "p@ss", account2);
        }