Esempio n. 1
0
        private static void savingsAccount(Account account)
        {
            IBankAccount bankAccount       = new SavingsAccount();
            IBankAccount shieldBankAccount = new DecoratorShield(bankAccount);

            //bankAccount.openAccount(c);
            shieldBankAccount.openAccount(account);
        }
Esempio n. 2
0
        private static void currentAccount(Account account)
        {
            IBankAccount currentAccount = new CurrentAccount();
            IBankAccount shieldAccount  = new DecoratorShield(currentAccount);

            //currentAccount.openAccount(account);
            shieldAccount.openAccount(account);
        }