Visual Basic™ Framework

Software Engineering: Simple Payroll Program

[ Previous ] [ Index ] [ Next ]

Quick Start Example

Table of Contents

 

Background Information

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.


ALERT

This quick start assumes that Visual Basic is already installed on your machine.  If not, download and install it[Outside link]


NOTE

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.

 

Back to top

 

How does this work?


ALERT

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.)

  1. Initial Steps to create a new project with a form.

ALERT

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.


ALERT

At this check point, record Semi Completion Time:  _____________


4.  Writing event procedures for the objects.


ALERT

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.


NOTE

With Salary = 10 and Overtime = 5, the amount of Pay Cheque :  _____________

ALERT

Congratulations! Record End Time:  _____________


Back to top

 

What next?

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.

 

Back to top

 

Last revised: 19 January 2004        15:00

 

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.