How to Create a Payroll Program With QBasic

How to Create a Payroll Program With QBasic thumbnail
Stepping through a QBasic payroll program helps you locate its errors.

A payroll program is a software-based tool for managing the amounts and dates related to paying your employees. The statements of the programming language QBasic let you write such a program. If you want to write a QBasic payroll program from scratch, it's best to first try out other payroll programs (in any language) and then write a detailed description of your program. Making a payroll program with QBasic, as opposed to other high-level programming languages like C and Java, lets you quickly fix bugs when they occur, because QBasic doesn't require the additional step of compilation.

Instructions

    • 1

      Print the source code for an open-source payroll program written in any programming language. Example programs include Anahaw, Enterprise and Piccolo. You'll translate the statements of these programs from their original programming language to QBasic. Unfortunately, open-source QBasic programs are scarce to nonexistent on the Web.

    • 2

      Write at the top of a piece of paper three words from left to right: "Variable," "Value" and "Purpose." The "Variable" column will list each variable in the payroll program. The "Value" column will contain the values those variables take on when the program's statements are executed. The "Purpose" column will contain your description of the variable's purpose, which you'll infer from the way the program changes the variable's values as you trace through the program.

    • 3

      Place a mark on the top statement in the source file you printed in Step 1 that holds the function labeled "main." Jot down in the "Values" column of the variables list the values of any variables in that first statement. This step begins a process of tracing through the original program's source code. Tracing through a program is the same as executing its code one statement at a time. Although you can't execute code by hand, you can follow the flow of execution that the running program will take. Doing so is an excellent way of understanding how a program works.

    • 4

      Erase the mark on the previous statement and place it on the next one down. Write down the values for any variables affected by this statement, as you did the top most statement. Continue moving the current statement mark to each successively lower statement in the file and updating the "Values" column.

    • 5

      Write, in the "Purpose" column, a description of the purpose of each variable you're tracking. You won't know the purpose for all variables at first, but you will after several sessions of tracing through the program completely. You can often determine a variable's purpose simply by interpreting its name, if the name is clear. For example, the variable "nextPayDate" likely holds the date of the next time payroll must be disbursed. Your goal is to write a descriptive comment for each variable in the program. Once you can do that and are familiar with QBasic syntax, you can move to the next step and translate the original program's statements to QBasic.

    • 6

      Read through a description of QBasic's syntax. Your QBasic programming editor or development environment will have this description in its documentation or online help system.

    • 7

      Translate each statement of the original payroll program to QBasic, then run the completed QBasic program.

Related Searches:

References

Resources

  • Photo Credit Jupiterimages/Photos.com/Getty Images

Comments

You May Also Like

  • Payroll Administrator Description

    Those companies that do not outsource to payroll solutions will hire an individual to run their payroll department. This position is given...

  • How to Write a Simple Program in C++

    It's common practice that instruction in C++ programming begins with creating a "Hello world" program. This involves printing a "Hello world" message...

  • How to Program 3D Games in QBasic

    QBasic is a programming language made by Microsoft, and is based closely on the BASIC language. QBasic can produce many types of...

  • How to Draw a Line With the QBasic Program

    QBasic is a programming language that Microsoft developed as a spin-off of the BASIC language, whose letters spell out "Beginners All Purpose...

  • How to Write Source Code

    Source code is the base code of any computer program. Whenever you write a computer program, you are writing the source code....

  • How to String QBasic to Multiple Lines

    QBasic is an older language used for MS-DOS applications and is similar to Visual Basic. QBasic lets you define strings, which are...

  • How to Write a Payroll Manager Job Description

    Effectively communicate the diverse functions required of payroll managers at your company by writing a specific payroll manager job description. Tailor the...

  • How to Activate a Comdata Card

    A Comdata card is issued to employees for the use of making company purchases, such as gasoline or office supplies. They are...

  • How to Read PDF File in Java

    It is not difficult to read PDF files in Java using libraries that are readily available. Reading PDF files allows you to...

  • How to Write a Bibliography With Multiple Authors

    The Modern Language Association (MLA) maintains a style guide followed by many authors for citing bibliographic references in a book or scholarly...

  • Payroll Jobs

    Most fundamentally, payroll specialists are responsible for ensuring that employees are paid accurately and on time. They are also responsible for programming...

  • How to Install QBasic

    QBasic is an integrated development environment (IDE) and compiler for the BASIC programming language. You can write simple programs using QBasic and...

  • How to Convert EXE to Code

    A software program is typically written in a high-level programming language such as C or Visual Basic. This native code is then...

  • Easy to Make Qbasic Games

    BASIC, which stands for Beginner's All-Purpose Symbolic Instruction Code, is still the most well-known programming language out there for absolute beginners, and...

  • Do it Yourself Payroll Software

    Employers have the complex and time-consuming responsibility of ensuring their employees are paid accurately and on time. Furthermore, they must compute and...

  • How to Draw Japanese Animations

    Did you ever watch an anime and think, "Wow, I wish I could draw like that!"? Now you can, with just a...

  • How to Do Your Payroll for Free

    The goal of payroll is to ensure employees are paid accurately and on time. In addition, payroll pays employer and employee taxes...

  • How to Make 2D Computer Games on Windows 98 for Free

    Windows 98 was the last Windows operating system to include QBasic bundled on its installation disk. QBasic is a beginner's programming language...

  • How to Program a Slot Machine in QBasic

    The programs you can make with the beginner's development language QBasic include games. Slot machine simulators fall into this category. Making such...

Related Ads

Featured