예제 #1
0
        public SavingAccounts CreateSavingAccount(string firstName, string lastName, long pesel)
        {
            int id = generateId();

            SavingAccounts account = new SavingAccounts(id, firstName, lastName, pesel);

            _accounts.Add(account);

            return(account);
        }
예제 #2
0
        static void Main(string[] args)
        {
            CheckingAccounts c1 = new CheckingAccounts("Nishat Tasnim Khan", 50000);

            c1.Show();
            c1.CheckAccount();
            c1.Deposit(3500);
            c1.Withdraw(45000);

            Console.WriteLine();

            SavingAccounts s1 = new SavingAccounts("Erfanul Haq", 100000000);

            s1.Show();
            s1.Deposit(25839);
            s1.Interest();
        }