Menu

(Solved) : Payroll Calculations Lookup File Timesheettxt 10948 Carpenter Stewart 503 21 3387 L31 407 Q28523581 . . .

Payroll Calculations with Lookup File

CSIS 123 C++ Programming Fundamentals Assignes - Payroll Payroll Caleulations with Lookup File Create the Windows console program described in a suitable folder. Name the Project Assign08-Payroll Use the two data input files provided. No separate directory is needed for the solution. Calculate pay for each employee and display fields as shown. Save the final version to the HI drive and put a copy on X:. The program calculates employee pay from information in two data files. Place both files in project folder Help Rutherford HourlyPay.txt - Notepad File Edit Format View L18 10.55 L19 11.87 L20 12.55 L21 14.07 L22 15.18 L23 16.10 L24 17.45 L25 18.05 L26 18.87 19.55 L28 21.00 L29 22.19 23.34 L31 24.83 L32 25.50 26.75 27.55 L35 29.00 L27 Jarndyce 573-78-3278 11000 Hertz 100Liggins 11002 Henderson Preston L30 643-99-8398 827-17.6126 473-21-7812 L1005 Katharine Felder Harriet 11007 11008 1009 11010 411-22-4242 599-29-3838 466-99-2639 L33 Harold Justin Rodney 11-20-2000 512.11.2012 L34 11012 L30 Arabruster Jamison Innes 1101 Reino 11017 411-22-2121 21-99-9999 905-53-2222 144-02-2233 Shertz Annunciata L39 Giovanni Open the TimeSheet file (TimeSheet.txt) and process each employee work record. Fields include a numeric employee ID. strings for last name and first name, a string field for social security number, a 3-character string indicating the pay grade for each employee, and the number of hours worked (decimal value). Output includes these fields, plus a calculated amount based on the hourly pay rate times number of hours worked. The hourly pay rate is stored in the HourlyPay file (HourlyPay.txt). Match the 3-character pay grade string (L18 through L35) in the TimeSheet file to the pay code value in HourlyPay. These codes are found in sorted order in the lookup file (HourlyPay.txt). Open the HourlyPay file every time a search for a match is performed by reading through the records in that file. Close the HourlyPay file after each lookup. The amount paid to an employee depends on the number of hours worked (from TimeSheet.txt) multiplied by the hourly rate found in a matching record found in HourlyPay.txt. Initialize the field used to hold the calculated pay for an employee to zero before performing the lookup. Several employees have invalid pay codes (no match), so their pay amounts will display as zero. These records are grouped at the end of the fil

Timesheet.txt

10948 Carpenter Stewart 503-21-3387 L31 40.7

10949 Pleasance Marie 433-82-7832 L27 35

10950 Dewey Susan 455-36-8299 L22 21

10951 Ahrens Christopher 488-23-7267 L27 44

10952 Brown Harvey 512-89-8328 L18 41

10953 Roe William 422-91-8282 L23 40

10954 Fuchs Marla 637-27-2878 L21 44

10955 Phelps Gus 284-78-3884 L31 39.5

10956 Genoa Vernon 466-37-8328 L22 41.2

10957 Henderson George 474-78-3873 L19 52

10958 Harness Janet 578-32-7823 L24 32

10959 Harris Wilmer 472-73-7237 L27 48

10960 Halls Melinda 426-76-7127 L29 40

10961 Garner Harriet 632-21-5125 L31 40

10962 Hind Roberta 313-28-7327 L34 42.5

10963 Mukerjee Vitjay 465-35-3255 L21 43

10964 Marino Elizabeth 472-38-7848 L18 37.5

10965 Pemberton Ronald 535-32-5623 L32 30

10966 Porter Loring 923-72-3877 L26 18

10967 Jones Robert 437-32-7828 L28 40

10968 Renner Jonathan 251-25-6562 L24 44

10969 Switzer Jesse 474-78-8732 L31 41.2

10970 Rutherford Martin 378-73-8787 L35 40

10971 Summers Alicia 484-89-4894 L31 40

10972 Smith Mary 489-48-9439 L29 34.5

10973 Rensen Lawrence 452-35-6632 L19 20

10974 Reynard-Hobbs Melva 472-78-3287 L20 40

10975 Jackson Ulrich 538-93-2892 L22 43

10976 Horvath James 723-78-2378 L18 45.9

10977 Williams Francis 573-78-2378 L31 42

10978 Wood Melanie 484-89-8943 L25 40

10979 Williams Horace 436-23-6763 L29 41

10980 Abend Esther 410-38-9002 L31 38

10981 Gregory Jerry 429-39-8299 L22 40

10982 Wood Eleanor 343-87-8778 L20 40

10983 Stark Ellen 585-98-5985 L30 43

10984 Simmons Mary 484-89-9849 L34 45.2

10985 Spears Roberta 489-32-9829 L18 51

10986 Siemens Frederic 429-82-3982 L20 40

10987 Simmons Elizabeth 489-43-8998 L29 39

10988 Snow Gregory 129-81-9829 L26 40

10989 Simms Martin 428-12-9812 L33 32

10990 Reynolds Martin 536-32-6727 L31 43

10991 Brown Fortney 461-67-7627 L18 45.6

10992 Rodgers Maryanne 483-29-8929 L20 40

10993 Pearson Austin 477-21-5215 L22 40

10994 Denton Sharon 571-27-2178 L26 40

10995 Heinrich Lothar 582-32-3782 L27 38.5

10996 Krimm Jacques 412-61-2761 L19 40

10997 Johnson Terrence 471-32-7812 L30 43

10998 Jarndyce James 411-92-8128 L25 50

10999 Smith William 573-78-3278 L22 40

11000 Hertz Conrad 483-28-9328 L23 40

11001 Higgins Preston 643-99-8398 L23 39

11002 Henderson Maureen 827-17-6126 L27 41.2

11003 Haroldson James 227-12-8728 L28 40.7

11004 Henderson Wilma 473-21-7812 L31 39.8

11005 Hines Katharine 492-48-8387 L32 40

11006 Garrick David 411-22-4242 L19 40

11007 Felder Harriet 599-29-3838 L22 44

11008 Maartens Robert 466-99-2839 L25 47

11009 Williamson Harold 661-12-1244 L27 40

11010 Gragg Justin 411-20-3999 L29 40

11011 Eckstein Rodney 512-31-2312 L34 15

11012 Armbruster Helena 522-13-2212 L30 46

11014 Jamison Leon 678-77-9443 L22 6

11015 Innes Neil 411-22-2121 L28 0

11016 Hannula Reino 211-99-9999 L10 68

11017 Shertz Hannah 905-53-2222 L39 5

11018 Annunciata Giovanni 144-32-2233 L15 27.5

HourlyPay.txt

L18 10.55

L19 11.87

L20 12.55

L21 14.07

L22 15.18

L23 16.10

L24 17.45

L25 18.05

L26 18.87

L27 19.55

L28 21.00

L29 22.19

L30 23.34

L31 24.83

L32 25.50

L33 26.75

L34 27.55

L35 29.00

CSIS 123 C++ Programming Fundamentals Assignes – Payroll Payroll Caleulations with Lookup File Create the Windows console program described in a suitable folder. Name the Project Assign08-Payroll Use the two data input files provided. No separate directory is needed for the solution. Calculate pay for each employee and display fields as shown. Save the final version to the HI drive and put a copy on X:. The program calculates employee pay from information in two data files. Place both files in project folder Help Rutherford HourlyPay.txt – Notepad File Edit Format View L18 10.55 L19 11.87 L20 12.55 L21 14.07 L22 15.18 L23 16.10 L24 17.45 L25 18.05 L26 18.87 19.55 L28 21.00 L29 22.19 23.34 L31 24.83 L32 25.50 26.75 27.55 L35 29.00 L27 Jarndyce 573-78-3278 11000 Hertz 100Liggins 11002 Henderson Preston L30 643-99-8398 827-17.6126 473-21-7812 L1005 Katharine Felder Harriet 11007 11008 1009 11010 411-22-4242 599-29-3838 466-99-2639 L33 Harold Justin Rodney 11-20-2000 512.11.2012 L34 11012 L30 Arabruster Jamison Innes 1101 Reino 11017 411-22-2121 21-99-9999 905-53-2222 144-02-2233 Shertz Annunciata L39 Giovanni Open the TimeSheet file (TimeSheet.txt) and process each employee work record. Fields include a numeric employee ID. strings for last name and first name, a string field for social security number, a 3-character string indicating the pay grade for each employee, and the number of hours worked (decimal value). Output includes these fields, plus a calculated amount based on the hourly pay rate times number of hours worked. The hourly pay rate is stored in the HourlyPay file (HourlyPay.txt). Match the 3-character pay grade string (L18 through L35) in the TimeSheet file to the pay code value in HourlyPay. These codes are found in sorted order in the lookup file (HourlyPay.txt). Open the HourlyPay file every time a search for a match is performed by reading through the records in that file. Close the HourlyPay file after each lookup. The amount paid to an employee depends on the number of hours worked (from TimeSheet.txt) multiplied by the hourly rate found in a matching record found in HourlyPay.txt. Initialize the field used to hold the calculated pay for an employee to zero before performing the lookup. Several employees have invalid pay codes (no match), so their pay amounts will display as zero. These records are grouped at the end of the fil Show transcribed image text

Expert Answer


Answer to Payroll Calculations Lookup File Timesheettxt 10948 Carpenter Stewart 503 21 3387 L31 407 Q28523581 . . .

OR