p.s. please use structures and functions also the program is required to use an input file it cannot ask the user to inp

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

p.s. please use structures and functions also the program is required to use an input file it cannot ask the user to inp

Post by answerhappygod »

p.s. please use structures and functions also the program is required to use an input file it cannot ask the user to input the information for each of the 30 employees it must read that information from the .txt file. please post the input that was used for the program.
P S Please Use Structures And Functions Also The Program Is Required To Use An Input File It Cannot Ask The User To Inp 1
P S Please Use Structures And Functions Also The Program Is Required To Use An Input File It Cannot Ask The User To Inp 1 (90.82 KiB) Viewed 9 times
P S Please Use Structures And Functions Also The Program Is Required To Use An Input File It Cannot Ask The User To Inp 2
P S Please Use Structures And Functions Also The Program Is Required To Use An Input File It Cannot Ask The User To Inp 2 (24.99 KiB) Viewed 9 times
there should be 30 employees
Using a structure, and creating three structure variables; write a program that will calculate the total pay for thirty (30) employees. (Ten for each structured variable.) Sort the list of employees by the employee ID in ascending order and display their respective information. Description Employee IDs Hours Worked Pay Rate Total Pay Structure name administrative office field DataType of INT Name of function of DOUBLE of DOUBLE of Double Properties of function payroll Definition of Function structure variable structure variable structure variable Excluding the main function, your program should have four additional functions that will get the hours worked, and payrate, calculate the total pay, sort the data and display your output. Base pay should be calculated by multiplying the regular hours worked by pay rate. If a person has worked over forty (40)hours, total pay is calculated by an adding 10% of base pay for every five (5) hours over forty (40) to base pay. (ie a person working 50 hours with a total pay of $100 would have ((hours-40)/5)*(base pay*.1) + base pay. Members employees jd hrworked_jd Note: jd represents the initials of the programmer. Your function names should be named by replacing the initials jd with your first and last initials payrate jd total_pay_jd Read Input File get_jd Called from main Array Size 10 10 10 Should pass hours worked and pay rate Calculate Pay calc_jd Called from main Should pass hours worked and pay rate and calculated total pay Sort Data sort_jd Called from main Sort data by student ID using the bubble or selection sort; passing all variables Output Results prt_jd Called from main Should pass employee id, hours worked, pay rate and total pay. Then print the data.
Employee ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Hours Worked 40 18 40 38.6 49.3 51.7 39.2 34 12 60 70 87.2 99 1 33 48.4 13 62.5 8 2 Pay Rate 20.5 60.32 12.5 15 80 10 19.24 13 8 70.12 11 34 12 300 43.5 43.3 10.7 32 11.25 7.75 Total Pay 820 1085.76 500 579 3944 517 754.208 442 96 4207.2 770 2964.8 1188 300 1435.5 2095.72 139.1 2000 90 15.5
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply