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

This program should be written In C++, The output should look like the screen sh

ID: 3820510 • Letter: T

Question

This program should be written In C++, The output should look like the screen shot except should have the user enter all 7 employee ID's before asking for the hours worked and pay rate for each employee. Can you please run the program to make sure the output is just like the screenshot(except includingall seven employees) please? It needs to have the output that that is in the screenshot provided but with all seven employee ID, thanks:)

Advanced Linked Lists

You have been hired by Employees, Inc to write an employee management system. The following are your specifications:

Write a program that uses the following linked lists:

empId: a linked list of seven long integers to hold employee identification numbers. The array should be initialized with the following numbers: 5658845 4520125 7895122 8777541 8451277 1302850 7580489

hours: a linked list of seven integers to hold the number of hours worked by each employee

payRate: any data structure (your choice) of seven doubles to hold each employee’s hourly pay rate

wages: a linked list of seven doubles to hold each employee’s gross wages

The program should display each employee number and ask the user to enter that employee’s hours and pay rate. It should then calculate the gross wages for that employee (hours times pay rate) and store them in the wages array. After the data has been entered for all the employees, the program should display each employee’s identification number and gross wages.

Input Validation: Do not accept negative values for hours or numbers less than 15.00 for pay rate.

When the program starts, it should ask the user to enter the employee IDs. There should be no limit on the number of IDs the user can enter.

The following screenshot shows a small subset of an example program run:

Explanation / Answer

#include <iostream>

#include <iomanip>

#include <string>

#include <cmath>

using namespace std; // Taking the namespace

int main() // entry point for theprogram

{

const int empId = 7;

int workers[empId] = {5658846, 4520125, 7895122, 8777541, 8451277, 1302850, 7580489};

int hours[empId];

double payRate[empId];

   

    cout << "Please enter the hours worked by " << empId

                << " employees and their "

                << "hourly pay rates. ";

for (int index = 0; index < empId; index++)

{

cout << "Please enter the hours worked by employee number " << (index+1) << " (ID = " << workers[index] << ") : ";

cin >> hours[index];

cout << "Please enter the pay rate for employee number "<< (index+1) << " (ID = " << workers[index] << ") : ";

cin >> payRate[index];

do

{

cout << "Please enter the hours worked by employee number " << (index+1) << " (ID = " << workers[index] << ") : ";

cin >> hours[index];

if(hours[index] < 0)

{

cout << "Enter in a positive number" << endl;

}

}

while(hours[index] < 0);

do

{

cout << "Please enter the pay rate for employee number "<< (index+1) << " (ID = " << workers[index] << ") : ";

cin >> payRate[index];

if(payRate[index] < 6)

{

cout << "The pay rate must be >= 6" << endl;

}

}

while(hours[index] < 6);

cout << "This is the gross pay for each employee: ";

cout << fixed << showpoint << setprecision(2);

}

for (int index = 0; index < empId; index++)

{

double grossPay = hours[index] * payRate[index];

cout << "Employee #" << (index + 1);

cout << ": earned $" << grossPay << endl << endl;

}

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote