Advertisement
Guest User

pseudo

a guest
Mar 20th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. set up read file
  2. read in line
  3. parse by commas
  4. send that line to a "createAccountFromSplitInputLine()" method
  5.  
  6. createAccountFromSplitInputLine(String[] lineSplit)
  7. has some local variables for creating accounts
  8.  
  9. if lineSplit = null throw error
  10.  
  11. try parseInt for first element to turn it from string to int (make sure there is no white space by using trim() )
  12.  
  13. based on what that value is create its associated account
  14.  
  15. if lineSplit == 4
  16. test the variables to make sure they are what you expect them to be
  17.  
  18. if lineSplit == 6
  19. test the variables to make sure they are what you expect them to be
  20.  
  21. if everything looks good and type is savings account {
  22. newAccount = new SavingsAccount(name, balance, rate);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement