CSCI101: Assignment #8Write a program with functions to help you balance your checking account. The program should read the initial balance for the month, followed by a series of transactions. For each transaction entered, the program should print the transaction data, the current balance for the account, and the total service charges. Service charges are $0.10 for a deposit and $0.15 for a check. If the balance drops below $500.00 at any point during the month, a service charge of $5.00 is assessed for the month. If the balance drops below $50.00, the program should print a warning message. If the balance becomes negative, an additional service charge of $10.00 should be assessed for each check until the balance becomes positive again.A transaction takes the form of an int number, followed by a blank and a float number. If the int number is a 1, then the float number is the amount of a check. If the int number is 2, then the float number is the amount of a deposit. The last transaction is 0 with no numbers following it. A sample input file might look like this: 879.46 1 400.00 2 100 0The corresponding output then would be: Initial balance: $879.46 Transaction: Check in amount of $400.00 Current Balance: $479.46 Service charge: Check --- charge $0.15 Service charge: Below $500 --- charge $5.00 Total service charge: $5.15 Transaction: Deposit in amount of $100.00 Current Balance: $579.46 Service charge: Deposit --- charge $0.10 Total service charge: $5.25 Transaction: End Current Balance: $579.46 Total service charge: $5.25 Final Balance: $574.21Use proper style and indentation, efficient programming techniques, meaningful identifiers, and a detailed algorithm. Use data files for input and output. Also, make sure to check data errors such as invalid transaction code or negative amounts. Must use at least 3 functions and must use pass by reference in at least one of your functions. |