Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Algorithm Development2

The document outlines an algorithm for calculating salary and incentives for 25 staff members, including employee details, gross pay, deductions, and net pay. It specifies deductions for income tax, education tax, NHT, and NIS, and includes an incentive for sales team members based on performance ratings. Additionally, it requires the implementation of a program to represent the algorithm and a trace table for testing with sample employee data.

Uploaded by

suwayne.84
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Algorithm Development2

The document outlines an algorithm for calculating salary and incentives for 25 staff members, including employee details, gross pay, deductions, and net pay. It specifies deductions for income tax, education tax, NHT, and NIS, and includes an incentive for sales team members based on performance ratings. Additionally, it requires the implementation of a program to represent the algorithm and a trace table for testing with sample employee data.

Uploaded by

suwayne.84
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SBASheet

Algorithm Development

Write an algorithm to calculate the salary and Incentive for all 25 Staff Members. The
algorithm should record the Employee Number, Name Department, Regular Pay and
Overtime pay for each employee. It should then calculate the Gross Pay, Gross Pay =
(Regular + Overtime). The algorithm should then calculate the amount for each employee
deductions. Deductions are as follows:

Income Tax 25 %
Edu Tax 2%
NHT 3%
NIS 2%

The algorithm should calculate and output the total Deduction and the Net Pay, Net Pay =
Gross Pay- Deductions.

If the employee is a Member of the Sales Team, the algorithm should ask for a Performance
Rating. If the Performance Rating is over 50 % the Salesperson should get an Incentive of
15% of their Gross Salary.
The algorithm should output the Employee Number Name, Gross salary, deductions, Total
deductions, Net Pay and Incentive if applicable.

Programming

Write a program to represent the algorithm above. Ensure that the program is
properly documented with a Problem definition, Author Name, Date Created,
comments, spaces, etc.

Trace Table

Create a Trace Table; use Test Data for at least five employees to test the program.
The test data should check for Sales persons whose Performance Rating is above or
below 50%

1
SBASheet

START

Declare Name:array[25],Department:array[25] as string

Declare EmployeeNumber ,i as integer

Declare RegularPay,OvertimePay,Grosspay, NetPay,Deductions,


Rating as float

INCOME_TAX = 0.25;

EDU_TAX = 0.02;

NHT = 0.03;

NIS = 0.02;

INCENTIVE_RATE = 0.15;

I=0

WHILE i<25 DO

PRINT “Enter the Employee ID:”

READ EmployeeNumber

PRINT “Enter the Employee FirstName:”

READ FirstName

PRINT “Enter the Employee LastName:”

READ LastName

PRINT “Enter the employee’s Department”

READ Department

PRINT “Enter the employee’s regular pay”

READ RegularPay

PRINT “Enter the employee’s Overtime pay”

READ Overtime

GrossPay= RegularPay + OvertimePay;

Deduction=(GrossPay * INCOME_TAX) + (GrossPay *


EDU_TAX) +

(GrossPay * NHT) + (GrossPay * NIS)

TotalDeduction=Deduction

NetPay=GrossPay- TotalDeduction
2
SBASheet

If Department==”Sales” THEN

PRINT “Please enter the performance rating”

READ Rating

IF Rating>50 THEN

Incentive=GrossSalary*.15

ENDIF

ENDIF

PRINT Employee Number,Name, GrossSalary, Deductions,


NetPay,

IF Rating>.50 THEN

PRINT Incentive

ENDIF

ENDFOR

STOP

3
SBASheet

Employee Name Department Performance Incentive


Rating
John Doe Sales 48 N

Masha Grae Management 56 N

Tommy Payne Sales 70 Y

Louise Lane Accoutning 76 N

You might also like