Back to slide -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'          bank-account/inheritance-1/account-client.cs - Use of virtual bank account methods.Lecture 7 - slide 36 : 40
Program 1

using System;

public class AccountClient{

  public static void Main(){
     BankAccount[] accounts = 
      new BankAccount[5]{
        new CheckAccount("Per",1000.0M, 0.03),
        new SavingsAccount("Poul",1000.0M, 0.03),
        new CheckAccount("Kurt",1000.0M, 0.03),
        new LotteryAccount("Bent",1000.0M),
        new LotteryAccount("Lone",1000.0M)
      };

    foreach(BankAccount ba in accounts){
      ba.AddInterests();  
    }  

    foreach(BankAccount ba in accounts){
      Console.WriteLine("{0}", ba);
    }
  }

}