Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please detailed pseudocode for: Design the application logic for a company that

ID: 3851692 • Letter: P

Question

please detailed pseudocode for:

Design the application logic for a company that wants a report containing a breakdown of payroll by department. Input includes each employee’s name, department number, hourly salary, and number of hours worked. Within each iteration of entering employee information, display the employee’s name, gross salary and department name (Hint: Be careful to take into consideration that arrays start at position/index 0). Once the end-user concludes entering employee data, you will need to output is a list of the seven departments in the company and the total gross payroll (rate times hours) for each department. The department names are shown in the table below.

Department

Number

Department

Name

1

Personnel

2

Marketing

3

Manufacturing

4

Computer Services

5

Sales

6

Accounting

7

Shipping

Department

Number

Department

Name

1

Personnel

2

Marketing

3

Manufacturing

4

Computer Services

5

Sales

6

Accounting

7

Shipping

Explanation / Answer

Pseudocode:

1. Initialize Total payroll to zero

2. Initialize grossSalary to zero

3. Initialize counter to zero

4. Input NumberOfEmployees

5. Initialize ArrayString dept[]={Personel,marketing,manufacturing,computer services,sales,accounting,shipping}

6. Initialize Array int Count[]=new int[7]; //it will save the number of employees in each deptt.

7. While counter is not equal to NumberOfEmployees

Input employee’s name, departmentnumber, hourlySalary, numberOfHours

Add one to the counter

grossSalary= hourlySalary * numberOfHours

DepartmentName=A[departmentNumber-1]

   Display Gross salary and departmentName

8. for(i=0;i<7;i++)

{

count[i]=occurence of depttNumber-1;

Payroll[i]=count[i]*grossSalary;

}

9. Display Total Gross payroll in the below format

For(int i=0;i<departmentNumber;i++)

{

print department name[i] and Payroll[i];

}