0% found this document useful (0 votes)
32 views

Introduction To Qbasic

This document provides an introduction and instructions for a payroll processing program in QBASIC. It outlines the input, process, and output steps for calculating an employee's gross pay, deductions, and net pay based on their name, hours worked, pay rate, and tax bracket. Sample test data is provided for four employees. The program is to loop through each employee's information, perform the calculations, and print the output until all employees have been processed. Comments are to be included at the top of the submitted code defining what the program does and describing each variable.

Uploaded by

Diansyah Putra
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Introduction To Qbasic

This document provides an introduction and instructions for a payroll processing program in QBASIC. It outlines the input, process, and output steps for calculating an employee's gross pay, deductions, and net pay based on their name, hours worked, pay rate, and tax bracket. Sample test data is provided for four employees. The program is to loop through each employee's information, perform the calculations, and print the output until all employees have been processed. Comments are to be included at the top of the submitted code defining what the program does and describing each variable.

Uploaded by

Diansyah Putra
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

INTRODUCTION TO QBASIC Project #1

i) Defining the Problem Introduction The INPUT, PROCESS AND OUTPUT of the problem are shown below:

Input
R e a d t h e E m p lo y e e N a m e R e a d t h e H o u r s W o rk e d

Process
C o m p u t e t h e fo llo w in g : G r o s s P a y = H o u rs W o rk e d * P a y R ate P er H our

Output
P rin t O u t E m p l o y e e N a m e , G ro s s P a y , D e d u c t io n s a n d N e t P a y

R ead the P ay R ate P er H our D e d u c t io n s = G ro s s P a y * Ta x R e a d t h e Ta x B ra c k e t B ra c k e t

N e t P a y = G r o s s P a y -D e d u c t io n s

. . . fo r e a c h e m p lo y e e o f A B C C om pany

. . . fo r e a c h e m p lo y e e o f A B C C om pany

. . . fo r e a c h e m p lo y e e o f A B C C om p any

R e p e a t t h e p r o c e s s u n t il y o u h a ve re a c h e d t h e e n d o f t h e e m p lo y e e fil e .

Use this Sample Data to Test Your Program: Name John Smith Pete Rose Carol Swimmer John Carlson Hours Worked 45 60 40 25 Pay Per Hour 12.85 18.25 15.00 10.00 Tax Bracket 25 33 30 20

Your Ouput Should Have: Name ****** ****** ****** ****** ii) Gross Pay ******** ******** ******** ******** Deductions ******** ******** ******** ******** Net Pay ******* ******* ******* *******

Writing the Program

Here is a model of how efficient program code would work: Pseudocode START INPUT EMPLOYEE NAME, HOURS WORKED, RATE OF PAY, TAX BRACKET information for the first employee DO WHILE there are more employees to be processed calculate GROSS PAY, DEDUCTIONS, NET PAY for the employee PRINT EMPLOYEE NAME, GROSS PAY, DEDUCTIONS, NET PAY for the employee INPUT EMPLOYEE NAME, HOURS WORKED, RATE OF PAY, TAX BRACKET information for the next employee LOOP STOP iii) What to Hand In

Hand in your program code with these comments at the top: REM REM REM REM REM Your Name TIK201-02 The Date Tell what the program does in a few short sentences Define all of your variables with describe the variable with a comment beside it,

DIM Variable Name like this

You might also like