This project is based on the banking system, UTT Insurance Limited. Each month the company calculates commission for its employee. UTT Insurance Limited has 5 employees and their names are Denver, Garry, Cindy, Samdaye and Nalinee. Each employee has their respective sales for the month which is recorded in an external file, “sales.txt”. It the total sales is more than one million the commission is 10% of the sales otherwise the commission is 5% of the sales. The external file, “sales.txt” has all the sales for one employee before recording another employee. The end of recording of each teller is noted by ‘E’. For example
Denver 100000 250000 50000 30000 60000 10000 E Garry 100000 40000 50000 120000 300000 50000 80000 120000 E
Write a C++ program that opens the external file, “sales.txt” and reads the data and writes to an external file, “commission.txt” the following information:
Denver Total sales 500000 Commision 25000
Garry Total sales 1210000 Commision 121000