Hello all, my assignment is to write a program that will read 10 records into a dataFile. Also, I have to create a dataFile that has my full name, course name, & date on the first 3 lines. The program will open the output file in append mode & write your output to this file. When the execution of program is complete, your output file should contain your name, course name, and date followed by the 10 employee records including their total pay.
Each record should contain a employee ID, hours worked, and pay rate. You should then calculate the total pay and write the record to an output file.
Excluding the main function, the program should have 3 additional functions (get_cd, calc_cd, prt_cd), that will get the employee I'd, hours worked, pay rate, and calculate the total pay.
The pay should be calculated by multiplying the hours worked by pay rate plus 10% of the total pay for every 5 hours over 40.
Part of my assignment was to write a program before this one, which I have completed, and involved the same program except the portion of my name, course name, and date being written to the dataFile on the first 3 lines. I have successfully completed the 1st program, but I'm not sure what I'm leaving out on the 2nd program. When I compile it then the txt file with my name, course name, and date isn't copying to the text file on the first 3 lines. Here is a copy of my source code. Does anyone have any suggestions?
This program compiles and will read the data file, calculate data, and write calculations to the output txt file, but will not copy the first 3 lines with my name, course name, and date to the output file. I typed this on my cell phone so I apologize for any possible type-o's.