Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the program should contain a global dictionary that contains 1 0 1 :'Barney Rubble', 1 0 2 :'Fred Flint', 1 0 3 :'Dino Dawg', 1
the program should contain a global dictionary that contains:'Barney Rubble', :'Fred Flint', :'Dino Dawg',:'Bambi Dawn', :'Betty Stone' the program should contain a minimum of four functions displayPage of used to display the user choices returns a string containing Display Managers Add Manager Process Manager Display Processed Managers End Program checkID takes a parameter called id searches the id of the dictionary returns True if the id is in the dictionary returns False otherwise calculateSalary takes two parameters, weeks worked and weekly pay if weeks worked exceed then the manager is paid a bonus bonus is of weekly pay if weeks, then bonus is weekly pay annual salary weeks worked weekly pay bonus pay returns annual salary calculateTax takes a parameter annual salary uses the table below returns the taxes owedThe Main Function uses the display function prompts the user to choose from: Display Managers Add Manager Process Manager Display Processed Managers End Program Display Managers loops through the dictionary on separate lines prints each Managers ID and Name Add Manager prompts the user for a Managers id makes sure that the id not already being used use checkID method force the user to enter an unused id prompts the user for name namePage of adds the Manager to the dictionary Process Manager prompt the user for a Managers id if id does not exist then force user to enter valid id then prompt for weekly wage weeks worked make sure that the numbers entered are reasonable not allowing negative numbers or excessive numbers if invalid data, then force user to enter valid data in order to continue remember weeks worked cannot exceed weeks calculates the salary using the calculateSalary function calculates the tax using the calculateTax function creates a string for each Manager containing ID Name, Salary, Income Tax, Net SalaryBarney Rubble, then appends the Manager string to a list use commas to separate the fieldsBarney Rubble,Fred Flint, create a separate list to track ID overtime hours, overtime pay Display Processed Managers loops through the list containing processed Managers displays two tablesi. salary and overtime salary regular pay table, prints out on separate lines, each Managers:ID Name Salary Taxes Net Salary Fred Budd overtime pay table, prints out on separate lines, each Managers:OvertimeID Weeks Pay SalaryNote: overtime salary is included with regular salary for tax calculation regular salary weeks worked weekly pay overall salary regular salary overtime salary net salary overall salary income taxesPage of income tax is based on the following table:Salary $ Income Tax of Salary to to to to
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