| Creation of three bank accounts. | Lecture 3 - slide 13 : 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);
a2.Deposit(1000.0M); a2.AddInterests();
a3.Deposit(3000.0M); a3.AddInterests();
Console.WriteLine(a1); // 100 kr.
Console.WriteLine(a2); // 1030 kr.
Console.WriteLine(a3); // 3060 kr.
}
} |