Need help with a program assignment I will post the directions,the data file, and lastly screenshot of what the final outputshould look like thank you for your help. Please use functions.
Create a file (datafile) named [ csci194.out] that has your full name, Course name and Date onthe first three lines. Then write a program using the instructionsbelow that will open the output file in append mode and write youroutput to this file.
The Record written should consist of Employee ID, hours worked,pay rate and total pay.
Description DataType VariablesEmployee IDs of INT employees_jdHours Worked of DOUBLE hrworked_jdPay Rate of DOUBLE payrate_jdTotal Pay of Double total_pay
Write a C++ program that will read 10 records into an array froma data file. Each record should contain an employee ID, hoursworked and pay rate. You should calculate a total pay and thenwrite the record to an output file. The Record written shouldconsist of Employee ID, hours worked, pay rate and total pay.
Total pay should be calculated by multiplying the hours workedby payrate plus 10% of total pay for every five (5) hours overforty (40). (ie a person working 50 hours with a total pay of $100would have ((50-40)/5)*(100*.1) added to total pay.
NOTE: Your function names should be named by replacing theinitials jd
Then, write the same program, but this time create a file(datafile) that has your full name, Course name and Date on thefirst three lines. Write the program to open the output file inappend mode and write your output to this file. When the executionof your C++ is complete, your output file should contain your name,course name and date followed by the 10 employee records includingtheir total pay.
data file with employee id, hours worked, and pay rate
345 43 22.3325 19 48.22543 20 20.5757 34.9 19489 38.7 61123 49.9 14987 59.2 11.85576 44 6286 12.65 26977 33 88
Screenshot of what output should look like
Once execution of your program has completed, the output file shoul contain your name, course name and date, each on a new line, followed by the 10 employee records including their total pay. Ex: John Doe Software Design & Programming II 11/25/2020 Employee ID Hours Worked Pay Rate Total Pay
Need help with a program assignment I will post the directions, the data file, and lastly screenshot of what the final o
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am