Question
Construct a java program that will retrieve, update and manipulate a small payroll database. The payroll data (payfile.txt) along with two additional files ( hirefile.txt,
Construct a java program that will retrieve, update and manipulate a small payroll database. The payroll data (payfile.txt) along with two additional files ( hirefile.txt, firefile.txt) required for this lab can be found down at the bottom of this question.
The program you are writing should do each of the following:
a) Read each line of data from payfile.txt, place the data into an Employee object, and insert the employee object onto the end of an Objectlist.
b) Output the contents of the info field of each ObjectListNode into an easily read table format with each field appropriately labeled.
c) Output the number of employees.
d)Output the first and last name of all women on the payroll.
e)Output the first and last names and salary of all weekly employees who make more than $35,000 per year and who have been with the company for at least five years.
f) Give a raise of $.75 per hour to all employees who are paid on an hourly basis and make less than $10.00 per hour; and give a raise of $50.00 per week to all employees who are paid on a weekly basis and make less than $350.00 per week. Be sure to output the first and last names and new salaries for each employee on the payroll who has received a raise.
g) Sort the nodes of the linked list into alphabetical order according to last/first name and print the first and last names and salaries for each employee on the payroll.
h) The file hirefile.txt contains data for three employees to be hired by the company. Insert each of the new employees into the correct location in the sorted linear linked list and print the first and last names for each employee on the payroll.
i) the file firefile.txt contains data for two employees to be fired by the company. Delete the corresponding nodes in the sorted linear linked list for each of the employees to be fired and print the first and last names for each employee on the payroll.
Here are the necessary files:
Payfile.txt
Howard Starr M 8 H 30.00 Joan Jacobus F 9 W 925.00 David Renn M 3 H 4.75 Albert Cahana M 3 H 18.75 Douglas Sheer M 5 W 250.00 Shari Buchman F 9 W 325.00 Sara Jones F 1 H 7.50 Ricky Mofsen M 6 H 12.50 Jean Brennan F 6 H 5.40 Deborah Starr F 3 W 1000.00 Jamie Michaels F 8 W 150.00
hirefile.txt
Barry Allen M 0 H 6.75 Nina Pinella F 0 W 425.00 Lane Wagger M 0 W 725.00
firefile.txt
Jean Brennan F Ricky Mofsen M
SIDE NOTES:
The classes used should contains at least the following:
ObjectListNode ObjectList Employee Driver Payroll
Here is an algorithm given to sort your linked lists:
While (list != null)
remove the first node
insert node into newList
List = newList
Please use java docs for every method.
Thank you for your help.
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