Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a problem that wants me to take two external files, compare them to one a

ID: 3546038 • Letter: I

Question

I have a problem that wants me to take two external files, compare them to one another, and output a single text file with the combined data. This is a payroll problem. The first external .txt file contains several people's names, employee Id's, and their rate per hour of work. The second .txt file contains their employee Id's and their total hours worked.


Not all employees worked during this pay period though. Therefore, some of the Id numbers on the second .txt file are missing, those are the people who did not work but still need to show up in the final product, just with 0 hours and 0 pay. Though some of the Id's are missing in the second file, because they didn't work during that pay period, the Id numbers are still ordered the same as the first file for those that remain.


I think I have the main portion of the program coded, just having some trouble with the processing function itself. Any helpful advice out there?

Explanation / Answer