For command pattern, I would prefer actions implemented as commands, In my opinion, using case/if else statements here defy the purpose of implementing command pattern...
So, instead of this:
public enum Action
{
Deposit, Withdraw
}
Maybe it's better to use this:
public class DepositCommand : ICommand{ }
public class WithdrawCommand : ICommand{}
For command pattern, I would prefer actions implemented as commands, In my opinion, using case/if else statements here defy the purpose of implementing command pattern...
So, instead of this:
Maybe it's better to use this: