Question
In C programming, Using a text editor , create the employee file shown it the following Table: This should be tabbed so that the value
In C programming,
Using a text editor , create the employee file shown it the following Table:
This should be tabbed so that the value line up with the words. Couldnt get the Post a Question box to tab.
Employee No. Department Pay Rate Exempt Hours Worked
0101 41 8.11 Y 49
0722 32 7.22 N 40
1273 23 5.43 Y 39
2584 14 6.74 N 45
Name it weeklyTimesheet.txt.
Write a program to read weeklyTimesheet.txt and create a payroll register file. Name it payroll.txt . The register will contain the following data:
a. Employee Number
b. Department
c. Pay rate
d. Exempt
e. Hours worked
f. Base pay (pay rate * hrs worked (40 hrs or below))
g. Overtime pay (non-exempt employee, calculated at 1.5 pay rate for hrs over 40)
h. Total pay
Present this data in an appropriately formatted table. Send all output to the text file as well as the standard output stream. This prgram should have error checking for opening and closing the file along with seperating the prgram into different functions for readabilty. You are not to use strings in this program as you have not learned how to impliment them properly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started