private static void savingsAccount(Account account) { IBankAccount bankAccount = new SavingsAccount(); IBankAccount shieldBankAccount = new DecoratorShield(bankAccount); //bankAccount.openAccount(c); shieldBankAccount.openAccount(account); }
private static void currentAccount(Account account) { IBankAccount currentAccount = new CurrentAccount(); IBankAccount shieldAccount = new DecoratorShield(currentAccount); //currentAccount.openAccount(account); shieldAccount.openAccount(account); }