Question
13.1 Linked Lists Purpose: After completing this assignment, you will have practiced using linked lists and linked list algorithms. Description For this assignment you will
13.1 Linked Lists Purpose: After completing this assignment, you will have practiced using linked lists and linked list algorithms. Description For this assignment you will write a program to simulate a payroll application. To that affect you will also create an Employee class, according to the specifications below. Since an Employee list might be large, and individual Employee objects may contain significant information themselves, we will store the Employee list as a linked list. Specification for Employee class: Attributes Employee ID: you can use a string the ID will contain digits and/or hyphens. The ID must be provided during object construction and there should be no mechanism to change it later. Number of hours worked: a floating-point number. Hourly pay rate: a floating-point number that represents how much the employee is paid for one hour of work. Gross wages: a floating-point number that stores the number of hours times the hourly rate. Methods A constructor (__init__) Setter methods as needed. Getter methods as needed. This class should overload the __str__ or __repr__ methods so that Employee objects can be easily displayed using the print() function. Specification for Node and LinkedList classes: You will need to provide an implementation of the Node and the LinkedList classes. If you wish, you can re-use the code demoed during lecture but you will need to add a comment citing the source and you may need to modify it. Main Script Your main script will simulate a basic payroll system. There should be a menu with the following options: Add new employee: this option allows you to enter the ID of a new employee and his/her hourly rate, creates an Employee object accordingly, and adds it to the list of employees. Enter Employee Hours: this option displays each employee ID and asks the user to enter the number of hours worked by each employee. The script should also (re)calculate the gross wages for each employee (hours times pay rate) and update their associated attributes accordingly. Display Payroll: this option displays each employees identification number, hours worked, hourly rate, and gross wages. Update Hourly Rate: this option allows the user update the hourly rate of one employee. The user should enter the ID of the employee. If the ID exits in the list, then the hourly rate can be updated. Remove Employee From Payroll: this option allows the user to remove an employee. The user should enter the ID of the employee. If the ID exits in the list, then the employee can be removed from the list. Quit the program You should continue to display the choices, and respond to user input, until the user chooses to quit/exit the program. Validation: Each employee number should be unique. Do not accept duplicate employee numbers. Do not accept negative numbers for hours worked. Do not accept numbers less than 6.00 for pay rate.
the programming language is python
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