static void Main() { CurrentAccount5 a1 = new CurrentAccount5("Di Wei", 342111, 10000); OverdraftAccount5 a2 = new OverdraftAccount5("Bennie", 342112, 10000); FXAccount a3 = new FXAccount("Jenny", 342113, 10000, "INR"); //BankAccount1 a4 = a2; a1.PrintInfo(); a2.PrintInfo(); a1.CreditInterest(); a2.CreditInterest(); a1.PrintInfo(); a2.PrintInfo(); Console.WriteLine(); //RunCreditInterest that runs CreditInterest() by taking account a2.RunCreditInterest(a2); a2.PrintInfo(); Console.WriteLine(); // a4.CreditInterest(); //a4.PrintInfo(); Console.WriteLine(); //Print method PrintAllDetails(a1, a2, a3); }
public void RunCreditInterest(OverdraftAccount5 a1) { a1.CreditInterest(); }