Question
Advanced Linked Lists Write a program (an employee management system) that uses the following linked lists: empId: a linked list of seven long integers to
Advanced Linked Lists
Write a program (an employee management system) 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 employees hourly pay rate
wages: a linked list of seven doubles to hold each employees gross wages
The program should display each employee number and ask the user to enter that employees 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 employees 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.
Here is the sample output:
Enter an employee ID number 565 8845 Do you want to enter another one? y Enter an employee ID number 4520125 Do you want to enter another one? y Enter an employee ID number 7895 1 2 2 Do you want to enter another one? n Enter the requested data for employee number 5 65 8845 Hours worked 2 3 Pay rate: $12.34 Pay rate must be 15.00 or more Please re-enter $16.78 Enter the requested data for employee number 4520 125 Hours worked 3 2 Pay rate: $23.45 Enter the requested data for employee number 789512 2 Hours worked 2 1 Pay rate $23.45 Employee Wages Employee #5 65 8845 385.94 Employee #45 20125 750 40 Employee #789512 2 492.45
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