| Selected messages to BankAccount methods from a client class. | Lecture 3 - slide 14 : 29 Program 2  | 
using System;
public class BankAccountClient {
  public static void Main(){
    BankAccount a1 = new BankAccount("Kurt", 0.02),
                a2 = new BankAccount("Bent", 0.03),
                a3 = new BankAccount("Thomas", 0.02);
    a1.Deposit(100.0M);
    a1.Withdraw(300.0M);
    Console.WriteLine("Account 1: {0}", a1.Balance());
    a2.Deposit(1000.0M); a2.AddInterests();
    a3.Deposit(3000.0M); 
    a3.Withdraw(1103.0M); 
    a3.AddInterests();
    Console.WriteLine(a1); 
    Console.WriteLine(a2); 
    Console.WriteLine(a3); 
  }
} |