using System;
using System.Collections.Generic;
using System.Text;
namespace GenericImplementation
{
class Program
{
static void Main(string[] args)
{
GenericBankCollection<SavingsBank> sbAccs = new GenericBankCollection<SavingsBank>();
sbAccs.Add(new SavingsBank("Sriram",34,"credit",1000));
sbAccs.Add(new SavingsBank("Saik",30,"debit",1000));
GenericBankCollection<CurrentBank> curAccs = new GenericBankCollection<CurrentBank>();
curAccs.Add(new CurrentBank("Mohan", 34, "credit", 1000));
curAccs.Add(new CurrentBank("Krishna", 30, "credit", 1000));
System.Console.WriteLine("Savings Accounts");
System.Console.WriteLine("=========");
foreach (SavingsBank savingsBank in sbAccs)
{
System.Console.WriteLine(savingsBank.ToString());
}
System.Console.WriteLine("Current Accounts");
System.Console.WriteLine("=========");
foreach (CurrentBank CurrentBank in curAccs)
{
System.Console.WriteLine(CurrentBank.ToString());
}
System.Console.ReadLine();
}
}
}