Question: Step 1: Create a module called mod Menus.py . It should contain the following functions: createMenu(optionList, menuTitle) returns a string getValidChoice(num Options, menuStr) returns an


Step 1: Create a module called mod Menus.py . It should contain the following functions: createMenu(optionList, menuTitle) returns a string getValidChoice(num Options, menuStr) returns an integer Step 2: Create a FUNCTION to read the initial employee information from a text file. Be SURE to let the USER enter the name of the text file, and CHECK to make sure their file exists! The text file will be structured as shown below, where each line contains the employee id, employee name, payrate and hours. NOTE: Each entry on the line is separated by a comma and a space. Example textfile: 111, George Gray, 12-1-2018, 10, 40 222, Amy Abrahmson, 1-5-2005, 10, 30 333, David Dell, 10-4-2019, 10, 42 444, Bob Brown, 3-14-2007, 5, 40 Create a FUNCTION to store the employee information into a DICTIONARY. It should map an emplD to a a LIST that contains name, hiredate, payrate, and hours. NOTE you are REQUIRED to use a dictionary for this program to store the employee information. Example of the empDict after the information shown has been read and stored: {111: ["George Gray", "12-1-2018", 10, 40), 222: ["Amy Abrahmson", "1-5-2005", 10,30), 333: ["David Dell, 10-4-2019", 10, 42), 444:["Bob Brown","3-14-2007", 5,40] } Step 3: Create the main function. It should use the create Menu function to make the menu string and continuously ask the user to enter a choice (by calling the getValidChoice function) until the user selects the option to quit. Process the choice by calling functions to add, delete, etc. Make sure to create FUNCTIONS for each of the major tasks in this program! addEmployee (empDict) returns the updated dictionary. asks the user to enter id, name, payrate, and hours stores the information into the empDict deleteEmployee(empDict) returns the updated dictionary. Asks the user to enter the ID of the employee to remove. MAKE SURE TO CHECK if that ID is actually contained in the dictionary - if not, print a message to the user stating the ID doesn't exist. If it's there, print a message after the entry has been removed to inform the user. calculatePay YOU decide what information should be passed to this function! calculates grossPay -- overtime hours (above 40) receive 1.5 times the regular payrate printReport(empDict) doesn't return anything. Simply prints a report Use strftime to format the date as shown, with the month name instead of the numeric month. Example of the report for the data shown: Employee Roster ID Name HireDate PayRate Hours GrossPay 40 30 111 222 333 444 George Gray Amy Abrahmson David Dell Bob Brown Dec 1, 2018 $10.00 Jan 5, 2005 $10.00 Oct 4, 2019 $10.00 Mar 14, 2007 $ 5.00 $400.00 $300.00 $430.00 $200.00 42 40 BONUS OPPORTUNITY: +5 Write information to a text file for those employees that worked 40 or more hours as shown (ID, lastName only, gross pay). Separate each with a comma & a space. One employee per line in the file. 111, Gray, 400.00 333, Dell, 430.00 +5 Sort the employees by LAST NAME for the report
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
