public AccountBase CreateAccount(AccountType accountType)
 {
     AccountBase account = null;
     switch (accountType)
     {
         case AccountType.Bronze:
             account = new BronzeAccount();
             break;
         case AccountType.Silver:
             account = new SilverAccount();
             break;
         case AccountType.Gold:
             account = new GoldAccount();
             break;
         case AccountType.Platinum:
             account = new PlatinumAccount();
             break;
     }
     return account;
 }
Exemplo n.º 2
0
        public AccountBase CreateAccount(AccountType accountType)
        {
            AccountBase account = null;

            switch (accountType)
            {
            case AccountType.Bronze:
                account = new BronzeAccount();
                break;

            case AccountType.Silver:
                account = new SilverAccount();
                break;

            case AccountType.Gold:
                account = new GoldAccount();
                break;

            case AccountType.Platinum:
                account = new PlatinumAccount();
                break;
            }
            return(account);
        }