he timeclock.txt file contains the hours worked data for every employee as well as the shift they worked. The layout for the file is as follows: EMPLOYEE NUMBER, HOURS WORKED, SHIFT 2. The personnel.txt file contains the names of all employees and their hourly pay rates. The layout for the file is as follows: EMPLO

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter9: Sequential Access Files And Menus
Section: Chapter Questions
Problem 4E
icon
Related questions
icon
Concept explainers
Question

1. The timeclock.txt file contains the hours worked data for every employee as well as the shift they worked. The layout for the file is as follows:

EMPLOYEE NUMBER, HOURS WORKED, SHIFT

2. The personnel.txt file contains the names of all employees and their hourly pay rates. The layout for the file is as

follows:

EMPLOYEE NUMBER, EMPLOYEE NAME, PAY RATE Note: Both the timeclock.txt and payroll.txt files are pre-sorted by EMPLOYEE NUMBER in ascending order.

Business Rules

1. For hours <= 40, the employee gross pay is: HOURS WORKED PAY RATE 2. For hours> 40, the employee gross pay is: HOURS WORKED PAY RATE 1.5

3. For shift 3, add $1 per hour to the employee pay rate

The program should:

1. Download both input files in the same folder that you will create your .py program.

2. Read both input files together.

3. Match the input files by the EMPLOYEE NUMBER.

4. For each record in the timesheet.txt file, write a record in a new output file named payroll,txt based on the business rules provided. The layout for payroll.txt is as follows:

EMPLOYEE NUMBER, EMPLOYEE NAME, GROSS PAY

5. Document your program with appropriate comments. Remember if you worked in teams, all team members names must be in the comments.

6. Test your program by comparing your results to this expectedpayroll.txt file. In general, running one test is not enough. Create at least two additional test runs by altering the timeclock.txt file. After EACH test run, rename the payroll.txt file to payroll1.txt, payroll2.txt, etc.

7. In the Word document that you created above, answer the question: My program runs as expected and why? Note: performing step 6 above informs this answer.

8. Save your file as payroll yourlastname.py

22476,45,3

24987,30,1

48283,50,2 85437,25,3

11235, Bob Smith, 10.50

22476, John Roberts, 12.35

24987, Mary Johnson, 15.90

32743, Brad Carson, 11.25 48283, Alice Martin, 14.20

85437, Aaron James, 15.15 

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L