02/07/06
TODAY'S DISCUSSION PAYROLL SYSTEM ASSIGNMENT AND LOOPS.
THE TEXTBOOK CONTACT
Publisher: American Press
28 State Street, Suite 1100
Boston, MA 02109
Tel (617) 247-0022, Fax (617) 247-0022
e-mail: ampress@flash.net
Today's Captain: Shahezad Contractor
Page 51
CASE STUDY - PAYROLL SYSTEM PHASE 2: INPUT/OUTPUT
| 2A) Compute gross pay for each
employee by interactively entering hours worked and hourly rate. The following is the sample input and output for Phase 2A:
ENTER EMPLOYEE ID: 5678 YOUR ID IS: 5678 |
COPY AND PASTE YOUR SNAPSHOT ONCE FINISHED.
ASSIGNMENTS SHOULD FOLLOW SPECIFICATIONS. ONCE FINISHED PLEASE UPLOAD EACH
ASSIGNMENT SEPERATELY TO YOUR WEB HOST
EX: GEOCITIES.
*Hints- Use employeeid
= inputbox("ENTER EMPLOYEE ID:") Hint
to this program is on page 45. In order to not get an error from visual
basic, you have to use DIM.
dim employeeid as integer.
msgbox ("YOUR ID IS: " &employeeid).
In programming you can't use % and ,
FOR EXTRA CREDIT ASSIGN
THE INPUT INTERACTION AND OUTPUT TO APPROPRIATE NAME AND THE TEXT BOX.
FOR EACH TEXTBOX ASSIGN A LABEL TO IDENTIFY IT. DO NOT USE MESSAGE BOX FOR
NOW. USE PROPERTY OF EACH TOOLBOX TO CLEANUP THE DEFAULT NAMES, CHANGE
COLOR AND ALSO SET OTHER PROPERTIES SUCH AS READ ONLY.
employeeid = inputbox("ENTER EMPLOYEE ID: ")
TEXTBOX1.text = employeeid
...program is under double click
of button1. (Cut and paste from the form load and delete the form load).
Change the name of button to computegross.
| 2B) Compute net pay for each
employee by applying a fixed tax rate of 10%. You must enter each
employee's id. (Enter only last four digits of SSN at this time.)
Sample input and output for Phase 2B: ENTER EMPLOYEE ID: 5678 YOUR ID IS: 5678
|
COPY AND PASTE YOUR SNAPSHOT ONCE
FINISHED.
1) DIM - DECLARE THE VARIABLES
2) INPUT - INPUTBOX OR DIRECTLY TO THE TEXTBOOK
3) PROCESS - COMPUTATION
4) OUTPUT - MSGBOX OR ASSIGN TO THE TEXTBOX
Question: Why is the employeeid an integer?
Answer: It is a whole number.
To use dashes use String for characters to declare it as a string.
As a style of programming comment each section of your program. IT IS VERY IMPORTANT

| Akibu, Hakeem O. | +2 |
| Alagheband, Shadi Crystal | +2 |
| Colon, Christen N. | |
| Contractor, Shahezad M. | CAPTAIN +2 |
| Francoeur, Ralph J. | +3 |
| Ghazanchyan, Farideh | +2 |
| Guo, Sunli | +1 |
| Halajian, Alishan A. | +2 |
| Hicks, Raheem | +1 |
| Hicks, Rory | +2 |
| Nemati, Matthew | +3 |
| Paul, My-Kerline | |
| Saeed, Amna | +1 |
| Saeed, Asma | +1 |