Introduction To Qbasic
Introduction To Qbasic
Introduction To Qbasic
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
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 ******* ******* ******* *******
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,