Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using vectors, write a program that will calculate the total pay for fifteen (15

ID: 3626863 • Letter: U

Question

Using vectors, write a program that will calculate the total pay for fifteen (15) employees.

You should have fifteen (15) different:

Description -DataType Way data is stored Vector Name
Student IDs -of INT -Entered into a vector after being initialized to an array -employees_jd
Hours Worked -of DOUBLE -Stored into a vector from input file -hrworked_jd
Pay Rate -of DOUBLE -Stored into a vector from same input file as hours worked -payrate_jd

Total pay should be calculated by multiplying the hours worked by payrate plus 10% of payrate for every five (5) hours over forty (40). (ie a person working 50 hours with a total pay of $100 would have ((50-40)/5)*(100*.1) added to total pay.

Note: _jd represents the initials of the programmer. Your array and function names should be named by replace the initials jd with your first and last initials

Excluding the main function, your program should have three additional functions that will get the scores, calculate the averages and display your output.
Functions
Read Input File Calculate Average Output Results
Name of function -get_jd -calc_jd -prt_jd
Properties of function-Called from main -Called from main -Called from main
Definition of Function-Should pass hours worked and pay rate vectors and add data to vectors -Should pass hours worked and pay rate vectors and calculate total pay and add total pay to vector
-Should pass employee id, hours worked, pay rate and total pay vectors and print data


Data file should be named data2_jd.txt

Explanation / Answer

Dear, Not clear with question writing sample code to start with the problem Declaring vectors vector <int> employee_ID; vector <double> hoursWorked; vector <double> payRate; vector <double> totalPay; vector <double> totalPay; int id; double hrs,rate,pay; for(int i=0;i<i<15;i++) { cout<<"Enter employee Id:"; cin>>id;    employee_ID.push_back(id);    cout<<"Enter hrs worked:";    cin>>hrs;    hoursWorked.push_back(hrs);    cout<<"Enter pay rate:";    cin>>rate;    payRate.push_back(rate);    if(hrs<40)        totalPay.push_back(hrs*rate);    else       {            pay= (40*rate)+(hrs-40)/5)*(100*0.1);             totalPay.push_back(pay);       } } Finally displaying totalPay vector will give pay's of all employess