Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a variable is created and it holds the information about BankAcct. r limitation

ID: 3735333 • Letter: A

Question

a variable is created and it holds the information about BankAcct. r limitation in creating variables (object references) to construct his limitation, this assignment needs to use an array. This approach has a major limitationi limitation obj ects. To overcome obiects is created in the class AcctCollection. BankAcct has public String custName; private double balance 0.0, and ariables Pubtie void deposit (double moneyln) .., public double withdrawal (double variables public intacctNo; public Collection BankAcct to, double amount) ..) and public double revenue) methods. a.., public double getBalance) 3, etc. money Ouy ..), class has two variables, account which is an array of BankAcct, and l account; int count; and methods, public void wireTransfer (BankAcct count: Ban from, . both BankAcct and AcctCollection classes have overloaded constructors, and toDisplay in t ameri methods. To run these classes, the AcctDriver class is created he AcctDriver class, we create two banks as an example, chase and boA (bank of ca), each of which has 10 and 5 accounts, respectively. Accounts are created and assigned then show the states of the objects. At last, money is wire-transferred from to an array. Objects of account invoke methods, deposit and withdrawal, and one account to

Explanation / Answer

Please find the program below. Line by line explanation is provided in the class java doc section. Program Execution output is also provided at last.

CLASS DEFINITIONS :
===================

====================

===============

EXECUTION OUTPUT :
==================

Chase ===================

[100 Chris 0.0]

[101 David 0.0]

B of A ==================

[100 BChris 0.0]

[109 Bob 0.0]

Chase ===================

[100 Chris 500.0]

[101 David 600.0]

[102 David 1000.0]

B of A ===================

[100 BChris 700.0]

[109 Bob 400.0]

Out of Balance, 500.0: 211.0 withdrawn and the current balance : 289.0

Out of Balance, 400.0: 177.0 withdrawn and the current balance : 223.0

Chase ===================

[100 Chris 289.0]

[101 David 600.0]

[102 David 1000.0]

B of A ===================

[100 BChris 700.0]

[109 Bob 223.0]

[102 Edwin 1000.0]

*** Chase revenue: 1889.0

*** BofA revenue: 1923.0

WIRETRANSFER from [100 Chris 289.0] :to [102 David 1000.0]:

Out of Balance, 289.0: 100.0 withdrawn and the current balance : 189.0

100.0transferred!

WIRETRANSFER from [100 Chris 189.0] :to [102 Edwin 1000.0]:

Out of Balance, 189.0: 100.0 withdrawn and the current balance : 89.0

100.0transferred!

Chase ===================

[100 Chris 89.0]

[101 David 600.0]

[102 David 1100.0]

B of A ===================

[100 BChris 700.0]

[109 Bob 223.0]

[102 Edwin 1100.0]

*** Chase revenue: 1789.0

*** BofA revenue: 2023.0