Question: Class relationships and inheritance in Java (You can copy and paste this data) accounts = new BankAccount[10]; accounts[0] = new ChequingAccount (1005, new Customer( 003,

Class relationships and inheritance in Java

(You can copy and paste this data) accounts = new BankAccount[10]; accounts[0] = new ChequingAccount (1005, new Customer( 003, Marjorie, Simpson, 'J'), 76.57f, new Date( 05, 11, 2019), 10.50f, 10); accounts[1] = new SavingsAccount (1001, new Customer( 001, Danny, Vito, 'D'), 6500.50f, new Date( 07, 09, 2023), 10, 5); accounts[2] = new SavingsAccount (1003, new Customer( 003, Marjorie, Simpson, 'J'), 5533.57f, new Date( 06, 12, 2019), 1, 2); accounts[3] = new SavingsAccount (1006, new Customer( 005, Jonas, Khanwald, 'M'), 0.60f, new Date( 07, 07, 2020), 10, 5); accounts[4] = new ChequingAccount (1002, new Customer( 002, Amy, Santiago, 'B'), 2576.57f, new Date( 09, 08, 2022), 10.50f, 10); accounts[5] = new ChequingAccount (1008, new Customer( 001, Danny, Vito, 'D'), 200.10f, new Date( 08, 12, 2023), 10, 0); accounts[6] = new SavingsAccount (1009, new Customer( 003, Marjorie, Simpson, 'J'), 33.21f, new Date( 06, 5, 2021), 1, 2); accounts[7] = new ChequingAccount (1010, new Customer( 006, Pedro, Pascal, 'B'), 500000.97f, new Date( 01, 11, 2020), 100, 1000); accounts[8] = new SavingsAccount (1004, new Customer( 004, Tetsuo, Shima, 'A'), 3000.60f, new Date( 03, 10, 2017), 10, 3); accounts[9] = new ChequingAccount (1007, new Customer( 007, Kaitlyn, Olsen, 'D'), 9000.50f, new Date( 03, 11, 2022), 50f, 10); 3. Display all Accounts will list all accounts in the following format: AccountNumber: customerId, lastName, firstName middleInit. balance Follow the list with a total balance row. 4. Display accounts by customerId prompts the user for a customerId and then displays a list with the same format as in 4 above, but only for accounts associated with the selected customerId. Total balance of all accounts. 5. Display all savings accounts under their min balance 6. Display all chequing accounts that are breaking their overdraft limit 7. Deposit - prompt user which accountNumber to deposit into 8. Withdraw prompt user accountNumber to withdraw from 9. Transfer prompt user for accountNumber to withdraw from and deposit into. How to write main program or driver as it is also called for this part of a question? In previous queestion that was posted here, how to write program, class part of question was answered.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!