Task Create a C++ application which wi read a file of daily payments, calculate the total as well as the average payment, display the results to the screen and write the results to a f e. The input and output file names should be provided as command line arguments. task 3.cpp The task 3.cpp file holds the main() function which is responsible for the following functionality: Extracts the input file name and output file name from the command line arguments. o lfthe number of command line arguments is not correct, throw an exception. The exception class is Argc error public logic error. o The exception handler should display a prompt for the correct usage and exit. Please use the same phrasing shown in the sample runs below Calls the appropriate openFile() function (see description below) to open the relevant files. If the file name returned by openFile() is different from the one originally specified in the command line require the user to confirm to proceed with processing or to quit. Please use the prompts shown in the sample runs provided below Reads the input file line by line, and extracts the relevant payment o Check if the extracted payments are valid. Throw an exception ifthe payment is not a number characters are digits from 09 The exception class for errors is Digit public logic error. o lfthe payment is not valid, the exception handler will skip the line, and display a message Please use the same error messages shown inthe sample runs below o A sample input data file, data txt, is shown below and provided in your A3 zip file. Each line has the first 40 char for the name, then 10 char space for the payment, and the rest of the line for comments Consultation fee error International Business Management Imperial Chemical 234 Pest control chemicals Coffee machines error 34S6 Security audit MicroHeart Software Consultancy 45678 University of Silver Quartet 5678 Facility management Connection fee error Telstar Satellite Communication 670 Line 1 has an error as “12”has an alphabetic “I’; Line 3 has an error as “34s6″ has an alphabetic ‘s’; Line 6 has an error as ’67o” has an alphabetic ‘o’; Each line has the first 40 char for the name, then 10 char space forthe payment, and the rest of the line for comments See the sample runs below for the expected results for the data.txt file provided Calculates the total as well as the average payment. Writes the results to the output file and displays it to the screen o See the sample runs below for the expected output forthe data.txt file provided The task 3.cpp file also contains two openFile() functions, oneeach to open the input andoutput files. Each openFile() function should provide the following functionality: Attempts to open the passed in file name