A First Case Project in Visual Basic.Net: Preparing an Income Tax Return

Journal of Information Systems Education, Summer 2004 by Simkin, Mark G

ABSTRACT

Most commercial programming applications are considerably more complex than the end-of-chapter exercises found in programming textbooks. This case addresses this problem by requiring the students in an entry-level Visual Basic programming class to create an application that helps users prepare their U.S. income tax returns. For convenience, the forms in this project are simplified versions of some of the tax forms that a U.S. taxpayer would use to complete a real income tax return-i.e., Schedules A, B, and C, as well as a Child Care worksheet and a Schedule 1040. Although integrative in nature, the case does not require advanced programming skills, is useful as an interim class assignment, and can be completed using either VB.6 or VB.Net.

Keywords: Visual Basic, VB.Net, Computer Programming, Project Development, Income Taxes, Data Validation, Multiple forms

1. INTRODUCTION

The purpose of this case is to require students to use elementary programming tools within the context of a comprehensive project-a tax-preparation case. The key screens required of the developer are a Main form that acts as a switchboard for the project, tax forms that represent simplified versions of Schedules A, B, and C of a U.S. tax return, a child care worksheet, a Schedule 1040, and an About window. The project also requires students to validate selected data values, use global, form-level, and procedure-level variables to compute required tax values, and carefully document their work. An additional feature (that instructors can omit if desired) is the requirement that students create one or more enhancements. This project is more complex than the chapter assignments found in most programming textbooks, and instructors should encourage their students to plan on spending considerably more time on this case than on simple programming assignments. The author has used this case for five years in a Visual Basic programming course with great success and usually allows students to work in groups.

2. AN INCOME TAX case

Many taxpayers now use computer tools to help them prepare their income taxes. This case requires its developers to create a simplified application for preparing a U.S. income tax return. Although a number of programming languages could be used for this task, the windows orientation of the user interfaces particularly lend themselves to the use of a Visual Basic as the primary development tool. The descriptions below outline the system's basic requirements. Figures 1-7 may be found in Appendices A-G, respectively.

2.1 Main Screen

The starting user interface is the Main Screen (Figure 1), which consists of several Labels, Text boxes, and Radio Buttons, as well as five Command Buttons. Its purpose is to acquire general information, and to allow the user to navigate among the several other supporting forms for the different tax schedules. The individual Buttons found at the bottom of this form are explained below.

2.2 Form 1040

When the user clicks on the "Form 1040" Button, the program displays that form (Figure 2). Note that some of the Labels in this screen appear in bold italics while others do not. As stated in the upper-right corner of this form, the program should compute values for the Text boxes with bold italics Labels, while the user should input information for the Text boxes without such Labels. Thus, for example, the user should input a value for "Wages, Salaries, Tips, etc." in line 2 of this form. However, the program (and not the user) should compute values for line 6 of this form-the amount for "adjusted gross income." This general rule applies to all the other forms as well. (You do not have to recreate the labels that remind you about this.) Finally, in Figure 2: (1) the term "These are Your Total Payments" on line 11 is the total amount the user paid in withholding and similar taxes, and (2) line 12 is the difference between line 10 and line 11.

2.3 Schedule A

When the user clicks on the "Schedule A" Button from the Main Screen, the screen for Schedule A appears (Figure 3). Here, the user enters dollar values for medical and dental expenses, taxes paid, interest paid, and so forth. When the user clicks on the "Calculate Deductions" Button in this form, the program adds the amounts in the Text boxes, displays this sum in the TextBox at the bottom of the form, and transfers the value from line 8 of this form to line 7 in Form 1040. When the user clicks on the "Main Screen" Button, the system hides the current form and displays the Main Screen form. When the user clicks on the "Print Form" Button, the program prints this form on paper. Finally, if the user clicks on the "Exit" Button, the program ends execution.

2.4 Child Care Worksheet

If the user wishes to enter a value for the child-care entry in line 7 of Schedule A, he or she must complete the worksheet shown in Figure 4. Note carefully: all the text entries in lines 1, 2, and 3 in this form are Labels-not Text boxes. When the user clicks on the label with caption "1" or "2" on the first or second line of this worksheet, the system displays sequential InputBoxes that prompt the user for his or her name (i.e., the "Name of Payee") and for his or her Social security Number. The system also displays a MessageBox that reminds this person to use the ScrollBar to the right in order to enter the amount paid for child care. The user must also enter the first name, last name, and qualified expenses paid for each child or dependent in lines 4 and 5 of this form. When the user clicks on one of the entries in the Applicable Percentage frame and then clicks on the Button with caption "Calculate Allowable Expenses," the system computes the totals shown on lines 3 and 6, determines the smaller of these two values in line 7, displays the appropriate percentage value in line 8, computes the "Allowable Child Care Expenses" in line 10, transfers the value from line 10 to line 7 in Schedule A, and formats the output. The remaining Buttons are self-explanatory, and work similarly to those in Schedule A.

 

BNET TalkbackShare your ideas and expertise on this topic

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
Click Here
advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement

Content provided in partnership with ProQuest