Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean modifyAccount(int accountNumber, String accountName) {
- for (int i = 0; i < this.accountList.size(); i++) {
- if(this.accountList.get(i).getAccountNumber() == accountNumber){
- this.accountList.get(i).setAccountName(accountName);
- return true;
- }
- }
- return false;
- }
- public boolean modifyAccount(int accountNumber, double accountBalance) {
- for (int i = 0; i < this.accountList.size(); i++) {
- if(this.accountList.get(i).getAccountNumber() == accountNumber){
- this.accountList.get(i).setAccountBalance(accountBalance);
- return true;
- }
- }
- return false;
- }
- public boolean modifyAccount(int accountNumber, String accountName, double accountBalance) {
- for (int i = 0; i < this.accountList.size(); i++) {
- if(this.accountList.get(i).getAccountNumber() == accountNumber){
- this.accountList.get(i).setAccountBalance(accountBalance);
- this.accountList.get(i).setAccountName(accountName);
- return true;
- }
- }
- return false;
- }
- public boolean modifyAccount(byte index, String accountName) {
- for (int i = 0; i < index; i++) {
- if (this.accountList.get(index) != null) {
- this.accountList.get(index).setAccountName(accountName);
- return true;
- }
- }
- return false;
- }
- public boolean modifyAccount(byte index, double accountBalance) {
- for (int i = 0; i < index; i++) {
- if (this.accountList.get(index) != null) {
- this.accountList.get(index).setAccountBalance(accountBalance);
- return true;
- }
- }
- return false;
- }
- public boolean modifyAccount(byte index, String accountName, double accountBalance) {
- for (int i = 0; i < index; i++) {
- if (this.accountList.get(index) != null) {
- this.accountList.get(index).setAccountName(accountName);
- this.accountList.get(index).setAccountBalance(accountBalance);
- return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement