Created
May 24, 2021 06:36
-
-
Save ssukhpinder/759a61a24d8b63d75892dc41340826a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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