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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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.

 

 

 

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%
Transcribed Image Text: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%
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education