Visual
Basic™ Framework
|
Software
Engineering: Simple Payroll Program |
[ Previous ] [ Index
] [ Next ]
Quick Start
Example
This quick start example helps you to
write a program to calculate the pay cheque for an employee. The employee has a basic salary is also paid
overtime at the rate of RM5 per hour.
|
|
This quick start assumes that Visual Basic is already installed on your
machine. If not, download
and install it. |
|
|
In this quick start program, the user can enter the employee name, salary and overtime amounts. When the user presses Enter in Salary or Overtime, the program will calculate the pay cheque amount. The program will stop when the 'Quit' button is clicked. |
|
|
First of all, you have to record Start Time: _____________ |
Follow these steps for a straightforward way to create a simple payroll program: (These steps are also listed in the index.)
|
|
After finishing the initial steps, record Quarter Completion Time: _____________ |
2. Specify the properties setting for the form so that Visual Basic will know what you want the window to look like when this form opens.
3. Add controls to create textboxes and labels in the form.
|
|
At this check point, record Semi Completion Time: _____________ |
4. Writing event procedures for the objects.
|
|
At this check point, record 2nd Quarter Completion Time: _____________ |
5. Complete your program like any other Visual Basic applications by adding a command button to terminate the program.
|
|
With Salary = 10 and Overtime = 5, the amount of Pay Cheque : _____________ |
|
|
Congratulations! Record End Time: _____________ |
Try to make the program more robust by putting in more error checks in the codes, so that you will understand how to create an enhanced Payroll Program using Visual Basic objects in subsequent tutorial.
Last revised:
If you spot an error, please contact sbho@mmu.edu.my In addition, please contact me if you find some aspects of this task is not explained clearly so that I can improve this documentation.