Answered step by step
Verified Expert Solution
Link Copied!

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 contains101:'Barney Rubble', 102:'Fred Flint', 103:'Dino Dawg',104:'Bambi Dawn', 105:'Betty Stone' the program should contain a minimum of four functions displayPage 2 of 4 used to display the user choices returns a string containing1. Display Managers2. Add Manager3. Process Manager4. Display Processed Managers5. 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 45 then the manager is paid a bonus bonus is 50% of weekly pay if 47 weeks, then bonus is (4745)* weekly pay *1.5 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:1. Display Managers2. Add Manager3. Process Manager4. Display Processed Managers5. End Program1. Display Managers loops through the dictionary on separate lines prints each Managers ID and Name2. 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 3 of 4 adds the Manager to the dictionary3. 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 52 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 Salary101,Barney Rubble,19200,1920,17280 then appends the Manager string to a list (use commas to separate the fields)101,Barney Rubble,19200,1920,17280102,Fred Flint,26250,2887.5,23362.5 create a separate list to track ID, overtime hours, overtime pay4. 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 Salary101 Fred Budd 20,0002,00018,000 overtime pay table, prints out on separate lines, each Managers:OvertimeID Weeks Pay Salary1014150600Note: 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 4 of 4 income tax is based on the following table:Salary ($) Income Tax (%)of Salary0 to 20,0001020,000.01 to 30,0001130,000.01 to 40,0001240,00.01 to 50,000.0013>50,00014

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

Students also viewed these Databases questions