Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set up read file
- read in line
- parse by commas
- send that line to a "createAccountFromSplitInputLine()" method
- createAccountFromSplitInputLine(String[] lineSplit)
- has some local variables for creating accounts
- if lineSplit = null throw error
- try parseInt for first element to turn it from string to int (make sure there is no white space by using trim() )
- based on what that value is create its associated account
- if lineSplit == 4
- test the variables to make sure they are what you expect them to be
- if lineSplit == 6
- test the variables to make sure they are what you expect them to be
- if everything looks good and type is savings account {
- newAccount = new SavingsAccount(name, balance, rate);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement