Example #1
0
        public static void Main()
        {
            CustomerS cus1 = new CustomerS("Tan Ah Kow", "2 Rich Street",
                                           "P123123", 20);
            CustomerS cus2 = new CustomerS("Kim May Mee", "89 Gold Road",
                                           "P334412", 60);

            AccountS a1 = new AccountS("S0000223", cus1, 2000);
            //Console.WriteLine(a1.CalculateInterest());
            OverdraftAccountS a2 = new OverdraftAccountS("O1230124", cus1, 2000);
            //Console.WriteLine(a2.CalculateInterest());
            CurrentAccountS a3 = new CurrentAccountS("C1230125", cus2, 2000);

            //Console.WriteLine(a3.CalculateInterest());

            //AccountS a4 = new CurrentAccountS("F7467228", cus2, 2000);
            //Console.WriteLine(a4.CalculateInterest());


            Console.WriteLine(a2.Show());
            Console.WriteLine(a2.CalculateInterest());
            a2.CreditInterest();
            Console.WriteLine(a2.Show());
        }
Example #2
0
 public OverdraftAccountS(string number, CustomerS holder, double bal)
     : base(number, holder, bal)
 {
 }
Example #3
0
 // Constructor
 public AccountS(string number, CustomerS holder, double bal)
 {
     accountNumber = number;
     accountHolder = holder;
     balance       = bal;
 }
Example #4
0
 public CurrentAccountS(string number, CustomerS holder, double bal)
     : base(number, holder, bal)
 {
 }