Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello everybody some help is appreciated thanks. Have attached a picture of the output and requirements for the java code. In a different Java class,

Hello everybody some help is appreciated thanks. Have attached a picture of the output and requirements for the java code.

In a different Java class, called TheBank.java create a Bank program with the following specifications:

? The Banks client file information is loaded from a file (named AccountBackUp.dat) that contains at most 1000 lines. Each line of the file contains a string representing the customer name, a unique integer identification number for the account and the current account balance in the account. (An array of BankAccounts should be created to hold the client file information. Use a constructor from the BankAccount class to instantiate each of the accounts.)

? Next, the Banks monthly transaction file (named TransactionsJanuary.dat) containing a month of transaction information is loaded from a file. (There is no limit on the number of lines in the file.) Each line contains a customer name and unique identification number, the type of transaction and the amount of the transaction. The transaction type could be one of (deposit, withdrawal, interest, charge). The amount of a deposit must be added to the BankAccounts balance; the amount of a withdrawal or (service) charge must be subtracted from the balance; and interest requires adding amount % interest to the BankAccount. Before applying each transaction, the name and identification number must be checked to see that they correspond to a single account; an error log must be added to an error log file (called error.dat) if they do not. Use member methods of the BankAccount class to alter the attributes of the appropriate BankAccount object.

? Output the entire updated Bank client file information (including customer name, identification number and account balance) into a file, ensuring that it is sorted in order of ascending identification number. Observe that the instance method toString() can be used to make a single String containing all attributes of a BankAccount object.

? Output, to the screen, the Bank client file information (just the customer name and account balance) to the screen, ensuring that it is sorted in order of descending account balance amount. This output should be output in groups of 20 lines, then the output stops waits for the user to hit the Enter key. HAND IN: Submit your TheBank.java file using the Assignments link of

image text in transcribed

Sample output using the provided AccountBackUp.dat and TransactionsJanuary.dat files: TRAN SA CTION UP DA T ING 32145 Jones, John 4389.57 45325 Jefferson, Jennifer 879.54 56324 Anderson, Blade 3424.34 34524 Babbled, Jay 163423.4 34668 Bonwild, Wendy 3416.5 32684 Cerute, Brent 23467.4 21356 Day, Darren 3124.65 ERROR: Accountame mismatch: Woods, Jim 34668 CLIENT A CCOUNT S 45325 Jefferson, Jennifer 704.46 34668 Bonwild, Wendy 3466.06 32145 Jones, John 4582.419999999998 56324 Anderson, Blade 14019.753255610402 32684 Cerute, Brent 23206.560000000005 21356 Day, Darren 26781.60651353751 34524 Babbled, Jay 161789.97999999998

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Group Size and Communication

Answered: 1 week ago