Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BankAccount A txt file name BankTransIn.txt contain O Cash Johnny 1001 D 10010 542 D 10011 1542 D 10012 5442 D 10013 7540 D 10017

BankAccount A txt file name BankTransIn.txt contain

O Cash Johnny 1001

D 10010 542

D 10011 1542

D 10012 5442 D 10013 7540 D 10017 5442 D 10016 7542 D 10011 1500 D 10012 5000 D 10013 7000 D 10017 6543 D 10016 7576 W 10017 1000 W 10016 65 W 10010 72 T 10017 54 10015 W 10017 20000 H 1001 O Williams Hank 1253 D 12530 10000 D 12531 10000 D 12532 10000 D 12533 10000 D 12534 10000 D 12535 10000 D 12536 10000 D 12537 10000 D 12538 10000 D 12539 10000 H 12534 W 12532 15000 H 1253 T 12539 765 43567 O Nelson Willie 9876 O Willis Bob 9876 1. The program will read in a string of transactions from a file into an in-memory queue. These transactions can open accounts, withdraw funds, deposit funds, transfer funds, or ask for the transaction history to be printed. 2) The program will next read from the queue and process the transac ons in order. 3. When the queue has been depleted the program will print out all open accounts and balances in those accounts. Each client account contains assets held in up to ten funds. A client account is represented by a rst and last name (two strings) and a unique 4 digit identifier. A fifth digit can be added to the digit id to represent the individual fund within the account as enumerated below: 0: Money Market 1: Prime Money Market 2: Long-Term Bond 3: Short-Term Bond 4: 500 Index Fund 5: Capital Value Fund 6: Growth Equity Fund 7: Growth Index Fund 8: Value Fund 9: Value Stock Index O: Open a client account with the appropriate funds D: Deposit assets into a fund W: Withdraw assets from a fund T: Transfer assets between funds (can be funds owned by a single client or transfers between clients) H: Display the history of all transac ons for a client account or for a single fund. Include errors in the output where appropriate. The final output will be look like Money Market: $470 D 10010 542 W 10010 72 Prime Money Market: $3042 D 10011 1542 D 10011 1500 Long-Term Bond: $10442 D 10012 5442 D 10012 5000 Short-Term Bond: $14540 D 10013 7540 D 10013 7000 Capital Value Fund: $54 T 10017 54 10015 Growth Equity Fund: $15053 D 10016 7542 D 10016 7576 W 10016 65 Growth Index Fund: $10931 D 10017 5442 D 10017 6543 W 10017 1000 T 10017 54 10015 W 10017 20000 (Failed) Transaction History for Hank Williams 500 Index Fund: $10000 D 12534 10000 Transaction History for Hank Williams by fund. Money Market: $10000 D 12530 10000 Prime Money Market: $10000 D 12531 10000 Long-Term Bond: $0 D 12532 10000 W 12532 10000 Short-Term Bond: $5000 D 12533 10000 W 12533 5000 500 Index Fund: $10000 D 12534 10000 Capital Value Fund: $10000 D 12535 10000 Growth Equity Fund: $10000 D 12536 10000 Growth Index Fund: $10000 D 12537 10000 Value Fund: $10000 D 12538 10000 Value Stock Index: $10000 D 12539 10000 ERROR: Account 4356 not found. Transferal refused. ERROR: Account 9876 is already open. Transaction refused. Processing Done. Final Balances Johnny Cash Account ID: 1001 Money Market: $470 Prime Money Market: $3042 Long-Term Bond: $10442 Short-Term Bond: $14540 500 Index Fund: $0 Capital Value Fund: $54 Growth Equity Fund: $15053 Growth Index Fund: $10931 Value Fund: $0 Value Stock Index: $0 Hank Williams Account ID: 1253 Money Market: $10000 Prime Money Market: $10000 Long-Term Bond: $0 Short-Term Bond: $5000 500 Index Fund: $10000 Capital Value Fund: $10000 Growth Equity Fund: $10000 Growth Index Fund: $10000 Value Fund: $10000 Value Stock Index: $10000 Willie Nelson Account ID: 9876 Money Market: $0 Prime Money Market: $0 Long-Term Bond: $0 Short-Term Bond: $0 500 Index Fund: $0 Capital Value Fund: $0 Growth Equity Fund: $0 Growth Index Fund: $0 Value Fund: $0 Value Stock Index: $0

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

More Books

Students also viewed these Databases questions

Question

Explain each step in change facilitation.

Answered: 1 week ago

Question

Is SHRD compatible with individual career aspirations

Answered: 1 week ago