0% found this document useful (0 votes)
12 views3 pages

Programming SBA Sample v2

The document outlines a program that calculates employee pay based on their job title and hours worked. It includes an IPO chart detailing the input, process, and output, as well as an algorithm for calculating regular and overtime pay. The program prompts for employee information and prints the calculated pay details for up to 12 employees.
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)
12 views3 pages

Programming SBA Sample v2

The document outlines a program that calculates employee pay based on their job title and hours worked. It includes an IPO chart detailing the input, process, and output, as well as an algorithm for calculating regular and overtime pay. The program prompts for employee information and prints the calculated pay details for up to 12 employees.
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/ 3

PROGRAMMING SBA

Problem Statement

A program is required that prompts for employee number, job title and
hours worked. It then calculates the regular, overtime pay and total pay
based upon the various pay rates and it prints out employee numbers, job
titles, hours worked, regular pay, overtime pay and total pay.

IPO Chart

INPUT PROCESS OUTPUT


EmployeeNumber Prompt for Employee EmployeeNumber
Number
JobTitle Read JobTitle
EmployeeNumber
HrsWorked Prompt for Job Title HrsWorked
Read JobTitle RegularPay
Prompt for hours OvertimePay
worked
Read HrsWorked TotalPay
Calculate regular pay
Calculate overtime
pay
Calculate total pay
Print
EmployeeNumber,
JobTitle, HrsWorked,
RegularPay,
OvertimePay, TotalPay

Algorithm

ALGORITHM PayrollCalculator
VARIABLES
EmployeeNumber, RateOfPay As Integer
JobTitle As String
HrsWorked, RegularPay, OvertimePay, TotalPay As Real/Float/Double
BEGIN
HrsWorked = 0
RateOfPay = 0
RegularPay = 0
OvertimePay = 0
TotalPay = 0
FOR counter = 1 TO 12 DO
PRINT “Please enter Employee Number”
READ EmployeeNumber
PRINT “Please enter Job Title”
READ JobTitle
PRINT “Please enter hours worked”
Read HrsWorked
IF JobTitle = ‘Manager’ THEN
RateOfPay = 100
ELSE IF JobTitle = ‘Accountant’ THEN
RateOfPay = 80
ELSE IF JobTitle = ‘Sales Representative’ THEN
RateOfPay = 50
ELSE IF JobTitle = ‘Courier Driver’ THEN
RateOfPay = 30
END IF
IF HrsWorked <= 160 THEN
RegularPay = HrsWorked * RateOfPay
ELSE
OvertimePay = (HrsWorked – 160) * RateOfPay * 2
RegularPay = RateOfPay * 160
END IF
TotalPay = RegularPay + OvertimePay
PRINT EmployeeNumber, JobTitle, HrsWorked, RegularPay,
OvertimePay, TotalPay
END FOR
END

You might also like