SHARE
TWEET

pseudo

a guest Mar 20th, 2017 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
Top