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

8. For each bank account, a variable is created and it holds the information abo

ID: 3738816 • Letter: 8

Question

8. For each bank account, a variable is created and it holds the information about BankAcct This approach has a major limitation in creating variables (object references) to construct objects. To overcome this limitation, this assignment needs to use an array An array of BankAcct objects is created in the class AcctCollection. BankAcct has variables public intacctNo; public String cust Name; private double balance 0.0; and methods, public void deposit (double moneyln)..., public double withdrawal (double moneyOut) ..3, public double getBalance0 .. , etc. AcctCollection class has two variables, account which is an array of BankAcct, and count: BankAcct[] account; int count; and methods, public void wireTransfer (BankAcct from, BankAcct to, double amount) and public double revenueO ) Of course, both BankAcct and AcctCollection classes have overloaded constructors, and toDisplay methods. To run these classes, the AcctDriver class is created. In the AcctDriver class, we create two banks as an example, chase and boA (bank of america), each of which has 10 and 5 accounts, respectively. Accounts are created and assigned to an array. Objects of account invoke methods, deposit and withdrawal, and then show the states of the objects. At last, money is wire-transferred from one account to

Explanation / Answer

Please find my implementation.

Please rate my answer if it helped you!!

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote