1.3 Write a complete algorithm to solve the following problem: You have been tasked to develop a payroll system for a company to calculate the net salary that each employee must receive. The information about each employee is stored in 5 parallel arrays, with examples of the values in the arrays, as follows: empNum empName empGrossSal numDependants taxPerc 813465 T Mahlangu 10200.00 3 20% 548926 R Pretorius 15700.00 1 35% 662908 K More 12600.00 4 30% 713890 F Knauff 5200.00 2 18% 412579 V Raphiri 35000.00 2 45% 916356 H Raseroka 11500.00 4 27% 528349 M Malebane 13000.00 1 30% 920345 Z Kgoete 10500.00 0 25% 710293 S Meintjes 7800.00 2 15% . . . . . 820394 T Radebe 5800.00 3 0% You can assume that there are already values loaded into these 5 arrays. Provision for 250 employees has been made in the arrays. All the arrays are global, i.e. they are accessible everywhere in the program (no need to send the array as a parameter). Your system should do the following: Calculate each employee’s net salary, by calculating the medical aid deduction, the tax payable, and deducting it from the gross salary. The gross salary must be placed in a 6th parallel array, called empNetSal. Display the total payroll. This includes the employee number, name, gross salary and net salary. At the end display the total gross salary, total deductions and the total net salary for all employees. Enter an employee number, and display this employee’s name, gross salary and net salary. Repeat this process until the user indicates he/she has no more employee numbers to enter and see the employee’s name, gross and net salary. The solution must have the following modules: A module to calculate the medical aid deduction. It is calculated as an amount of R1500 for the main member (the employee) plus the number of dependants times an amount of R850. This module receives the particular employee’s number of dependants from the main module, and calculates and returns the deduction based on this. A module to calculate the tax payable, receiving the tax percentage for the employee. A module to display the total payroll.
1.3 Write a complete
You have been tasked to develop a payroll system for a company to calculate the net salary that each employee must receive. The information about each employee is stored in 5 parallel arrays, with examples of the values in the arrays, as follows:
empNum |
|
empName |
|
empGrossSal |
|
numDependants |
|
taxPerc |
813465 |
T Mahlangu |
10200.00
|
3 |
20% |
||||
548926 |
R Pretorius |
15700.00 |
1 |
35% |
||||
662908 |
K More |
12600.00 |
4 |
30% |
||||
713890 |
F Knauff |
5200.00 |
2 |
18% |
||||
412579 |
V Raphiri |
35000.00 |
2 |
45% |
||||
916356 |
H Raseroka |
11500.00 |
4 |
27% |
||||
528349 |
M Malebane |
13000.00 |
1 |
30% |
||||
920345 |
Z Kgoete |
10500.00 |
0 |
25% |
||||
710293 |
S Meintjes |
7800.00 |
2 |
15% |
||||
. |
. |
. |
. |
. |
||||
820394 |
T Radebe |
5800.00 |
3 |
0% |
You can assume that there are already values loaded into these 5 arrays. Provision for 250 employees has been made in the arrays. All the arrays are global, i.e. they are accessible everywhere in the program (no need to send the array as a parameter).
Your system should do the following:
- Calculate each employee’s net salary, by calculating the medical aid deduction, the tax payable, and deducting it from the gross salary. The gross salary must be placed in a 6th parallel array, called empNetSal.
- Display the total payroll. This includes the employee number, name, gross salary and net salary. At the end display the total gross salary, total deductions and the total net salary for all employees.
- Enter an employee number, and display this employee’s name, gross salary and net salary. Repeat this process until the user indicates he/she has no more employee numbers to enter and see the employee’s name, gross and net salary.
The solution must have the following modules:
- A module to calculate the medical aid deduction. It is calculated as an amount of R1500 for the main member (the employee) plus the number of dependants times an amount of R850. This module receives the particular employee’s number of dependants from the main module, and calculates and returns the deduction based on this.
- A module to calculate the tax payable, receiving the tax percentage for the employee.
- A module to display the total payroll.
![A 5. U =
PROJECT 7 Delicious Dish4-Week 11 13(1) (Protected View) - Word
File
Home
Insert
Design
Layout
References
Mailings
Review
View
O Tell me what you want to do...
2 Share
PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View.
Enable Editing
1.3
Write a complete algorithm to solve the following problem:
You have been tasked to develop a payroll system for a company to calculate the net salary
that each employee must receive. The information about each employee is stored in 5
parallel arrays, with examples of the values in the arrays, as follows:
empName
T Mahlangu
еmpNum
empGrossSal
numDependants
taxPerc
813465
10200.00
20%
R Pretorius
К Мore
E Knauff
V Raphiri
H Raseroka
548926
15700.00
35%
662908
12600.00
30%
5200.00
35000.00
713890
18%
412579
45%
916356
11500.00
27%
528349
M Malebane
13000.00
30%
Z Kgoete
S Meintjes
10500.00
7800.00
920345
25%
710293
15%
820394
T Radebe
5800.00
0%
You can assume that there are already values loaded into these 5 arrays. Provision for 250
ployees has been made
everywhere in the program (no need to send the array as a parameter).
Your system should do the following:
arrays. All the arrays are global, i.e. they are accessi
Calculate each employee's net salary, by calculating the medical aid deduction, the
tax payable, and deducting it from the gross salary. The gross salary must be placed
in a 6th parallel array, called empNetSal.
Display the total payroll. This includes the employee number, name, gross salary and
net salary. At the end display the total gross salary, total deductions and the total
net salary for all employees.
Enter an employee number, and display this employee's name, gross salary and net
salary. Repeat this process until the user indicates he/she has no more employee
numbers to enter and see the employee's name, gross and net salary.
The solution must have the following modules:
A module to calculate the medical aid deduction. It is calculated as an amount of
R1500 for the main member (the employee) plus the number of dependants times
an amount of R850. This module receives the particular employee's number of
DSO17BT
dependants from the main module, and calculates and returns the deduction based
on this,
A module to calculate the tax payable, receiving the tax percentage for the
employee.
A module to display the total payroll.
Page 3 of 9
1306 words
82%](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6d6ac471-6557-492d-aea2-9dab3cc4e91c%2F83d1e064-d9d9-445c-9e65-026c4ddb64d4%2Fkgfboo9_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)