Cleaning the model
To have a clean and complete model and implementation, we should:
- Remove the create methods from AccountLocalHome, because all accounts should be either checking or savings accounts.
- Remove the setAccountType method from the AccountLocal interface, because the type of an account cannot be changed.
- Remove the setBalance method from the AccountLocal interface, because the balance can only be changed through deposit and withdraw transactions.
This is not necessary for our sample, but should give you ideas for design issues you should think about in a real application.