Menu

[solved]-Write Program Following Repeat B Read Record Unsorted Text File Records Record Represent Q39065828

Write a program to do the following:

a. Repeat

b. Read a record of an unsorted text file of records where eachrecord represent the bank account of a customer. The record is astruct that has the following fields:

i. ID which is an integer,

ii. Name of the customer which is a string and

iii. Balance of the account which is of type double.

c. Create a node and insert the fields of the record in the datapart of the linked list d. Store each record in a node such thatthe linked be sorted according to the ID. e. Until the end of fileof the accounts information

f. Create a new file in order to write the accounts with theupdated information on this new file as described in the followingsteps:

g. Repeat

h. Read a record from a transaction file of records where eachrecord represent a transaction. The record of this file is composedof”

i. ID which is an integer, which is the same as the one of theID’s in the accounts’ file.

ii. Type of transaction which is an enumeration type (deposit,withdraw)

iii. Amount to be added to the balance if the transaction is(deposit) or subtracted from the balance if the transaction is(withdraw)

i. Search the node that has the account information using the IDof the transaction read from the transaction file and update thebalance accordingly.

j. Until the end of the transaction file

k. Write the linked list on the update file in order

l. Printout the updated file to show that your program workscorrectly

Example Assume you have the following:

Account file: 123 John Smith 2345.78

117 Michael Korse 6789.34

455 Ibrahim Mahmoud 8883.98

The linked list constructed will be as follows: 117 MichaelKorse 6789.34 123 John Smith 2345.78 455 Ibrahim Mahmoud 8883.98Null

Assume you have the following:

Transaction file: 455 withdraw 200

117 deposit 300

The updated file will be: 117 Michael Korse 7089.34

123 John Smith 2345.78

455 Ibrahim Mahmoud 8683.98

What to submit • • •

A header file containing the definition of the linked class Youcan include only the functions that are needed in yourapplication

A C++ file containing the implementation of the class

A C++ file containing the main function that implements theapplication

Expert Answer


Answer to Write a program to do the following: a. Repeat b. Read a record of an unsorted text file of records where each record re… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *