SHARE
TWEET

Untitled

a guest Oct 21st, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public boolean modifyAccount(int accountNumber, String accountName) {
  2.         for (int i = 0; i < this.accountList.size(); i++) {
  3.             if(this.accountList.get(i).getAccountNumber() == accountNumber){
  4.                 this.accountList.get(i).setAccountName(accountName);
  5.                  return true;
  6.             }
  7.         }
  8.         return false;
  9.     }
  10.     public boolean modifyAccount(int accountNumber, double accountBalance) {
  11.         for (int i = 0; i < this.accountList.size(); i++) {
  12.             if(this.accountList.get(i).getAccountNumber() == accountNumber){
  13.                 this.accountList.get(i).setAccountBalance(accountBalance);
  14.                 return true;
  15.             }
  16.         }
  17.         return false;
  18.     }
  19.     public boolean modifyAccount(int accountNumber, String accountName, double accountBalance) {
  20.         for (int i = 0; i < this.accountList.size(); i++) {
  21.             if(this.accountList.get(i).getAccountNumber() == accountNumber){
  22.                 this.accountList.get(i).setAccountBalance(accountBalance);
  23.                 this.accountList.get(i).setAccountName(accountName);
  24.                 return true;
  25.             }
  26.         }
  27.         return false;
  28.     }
  29.  
  30.     public boolean modifyAccount(byte index, String accountName) {
  31.         for (int i = 0; i < index; i++) {
  32.             if (this.accountList.get(index) != null) {
  33.                 this.accountList.get(index).setAccountName(accountName);
  34.                 return true;
  35.             }
  36.         }
  37.         return false;
  38.     }
  39.     public boolean modifyAccount(byte index, double accountBalance) {
  40.         for (int i = 0; i < index; i++) {
  41.             if (this.accountList.get(index) != null) {
  42.                 this.accountList.get(index).setAccountBalance(accountBalance);
  43.                 return true;
  44.             }
  45.         }
  46.         return false;
  47.     }
  48.     public boolean modifyAccount(byte index, String accountName, double accountBalance) {
  49.         for (int i = 0; i < index; i++) {
  50.             if (this.accountList.get(index) != null) {
  51.                 this.accountList.get(index).setAccountName(accountName);
  52.                 this.accountList.get(index).setAccountBalance(accountBalance);
  53.                 return true;
  54.             }
  55.         }
  56.         return false;
  57.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top