Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Program
{
static void Main(string[] args)
{
IAccountFactory accountFactory = new AccountFactory();
var savingAccount = accountFactory.GetAccoutType("SAVINGS");
Console.WriteLine("Saving account balance: " + savingAccount.Balance);
var currentAccount = accountFactory.GetAccoutType("CURRENT");
Console.WriteLine("Current account balance: " + currentAccount.Balance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment