This assignment is amodificationof the textbook Chapter 5, Exercise 7, page 170.DIRECTIONS:This assignment has two (2) parts. For each part create separate documents using Word or a text editor for...

1 answer below »



This assignment is amodificationof the textbook Chapter 5, Exercise 7, page 170.
















DIRECTIONS:This assignment has two (2) parts. For each part create separate documents using Word or a text editor for the pseudocode solutions and separate documents using a drawing tool for the flowcharts.








Name each file with the part it addresses. For example, for Part 1’s pseudocode the file name will be:part1.doc or part1.txt.








Hints for both parts:







  • Use a 2D array for department’s payroll. You can use the index of the array as the department’s number.



  • The assignment will not know how many employees will be processed unknown size.



  • Use a loop to capture and process all the employee data.



    • As you handle the capturing the employee data, calculate the payroll for the employee and save it into the department array.



















Part 1:





Design the logic for a company application that breaks down payroll by department. Input includes each employee’s last name, first name, department number, hourly salary, and number of hours worked. Output is a list of the seven departments in the company (numbered 1 through 7) and the total gross payroll for the department (sum of therate x hoursof all its employees) for each department.







Example input should be as follows





Wood, Anita, 4, 52, 40







Example output should be as follows:





1: 5648




2: 51688




3: 546983




4: 893166




5: 234689




6: 194136




7: 46813549







Part 2:





Modify Exercise 7a so that the report listsdepartment namesas well asnumbers. The department names are shown in the table below.





















Example output should be as follows:





Personnel, 1: 5648




Marketing, 2: 51688




Manufacturing, 3: 546983




Computer Services, 4: 893166




Sales, 5: 234689




Accounting, 6: 194136




Shipping, 7: 46813549











SUBMISSION:Submit all four (4) documents, the pseudocodes as aPDF, .txt,orWorddocuments and the charts as aPDF, .png, orWorddocuments as attachments.

Answered 2 days AfterMar 02, 2023

Answer To: This assignment is amodificationof the textbook Chapter 5, Exercise 7, page 170.DIRECTIONS:This...

Vikas answered on Mar 05 2023
47 Votes
First
    # Initialize 2D array for department's payroll
department_payroll = [[0] for i in range(7)]

# Process employee data
employee_data = [
"Wood, Anita, 4, 52, 40",
"Smith, John, 3, 45, 42",
"Johnson, Sarah, 5, 36, 45",
"Lee, David, 1, 38, 50",
"Chen, Amy, 2, 50, 55",
"Garcia, Maria, 7,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here