![]() ![]() ![]() | bank-account/bank-account-5/bank-account-client.cs - A client BankAccount. | Lecture 3 - slide 16 : 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(); BankAccount a = BankAccount.GetAccount(2); if (a != null) Console.WriteLine(a); else Console.WriteLine("Cannot find account 2"); } }