PS: USE PTYHON FOR CODING
Write a program that will perform the following: A. Display Employee List (Retrieve records from empList.txt, store it in a dictionary, display the employee list arranged by keys) Note: Refer to example code in dictionary module (bbl) for sorting B. Add Employee ( Ask user to input the following data: - unique employee number - lastname - firstname - department -rate per day Write the employee record to the empList.txt )
C. Add Payroll Record (Ask user to input the following data: -employee number -month -no of days worked write the payroll record into the empMR.txt ) D. Generate pay slip Ask for employee number and month of the payslip to be generated Create a payslip like statement written in a text file. Payslip for the Month of Employee No.:. Employee Name: No. of Days Department: Rate per Day: Worked: Gross Pay: EEEEEE Validation
Add Employee Record • Employee Number (9-digits) • last and Firstname (characters only) • Department must one of the following: Accounting, Marketing, Human Resources, Finance, MIS, Admin • Rate per Day (numbers) Add Payroll Record • Employee Number (must be of an existing employee) • Month (1-12) only • No. of Day : whole numbers (depend on the number of days of the given Month) • There must be only one record for one employee for each month. Generate Payslip Employee No. (must be an existing employee) Month (1-12 and must be existing in the record) Save the textfile as EmployeeNo_MonthNo (e.g 201911007_1.txt)
Rubric: Functionality 25 Exception Handling 20 File Manipulation 20 Coding Style (Module/Functions Data Structures) 20 Formatting/Output Design 15 Input 1. data Output A -Display Employee List B --Add-Employee C. -Add Payroll Record D - Generate Payslip X - Exit X Enter your choice: X Good Bye!
Write a program that will perform the following: A. Display Employee List (Retrieve records from empList.txt, store it i
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a program that will perform the following: A. Display Employee List (Retrieve records from empList.txt, store it i
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!