Homework Assignment 3

About this homework

This assignment will exercise your skills with Visual Basic for Applications (VBA). You will create a very simple data-entry form and program a decoding routine according to a one-page statement of "high-level requirements," as explained below. You are to turn in your assignment as an Access 2000 MDB file on a floppy disk labeled with your name, the date, and the assignment number.

The assigned task will test both your VBA skills and your ability to follow a high-level software requirement. You will need to know how to create a form with two text boxes and one button. To get the best grade on the assignment, adhere to the class Software Standards.

Technical Requirements for Assignment 3

The two paragraphs below lay out the technical requirements for Assignment 3. These have been established in order to standardize grading. This material will be more meaningful to you after you have read the attached Requirement Statement for Assignment 3.

You will begin by creating a form called frmAssignment3. It should have two text boxes and a button labeled Decode. Use Assignment 3 as the form's caption. Title the form Decoding Engine. Name the command button cmdDecodeClear. Name the input control txtInput and label it Coded Input. Name the output control txtOutput and give it the label Decoded Output.

Name the decoding engine (a function) which you develop DecodingEngine. Note that the engine is not to be integrated into the form module. Graders will expect to find it as one or more public function(s) in the modDecodingEngine module.

Keep in mind when planning the project the stated requirement for the engine to be self-contained with the design permitting easy migration ("reuse" via copy or import) from form input to database input. Per Software Standards, use remarks at the top of the module source code to briefly describe how to use your engine. In theory, your engine will be given to another programmer for the database input phase. Write the remarks as if your roles were reversed.

Output from the engine must be interfaced with the data entry form, which testers will use to key in data and evaluate the output. The desired key sequence is: (1) enter a coded value; (2) press Enter or click the button; (3) view the decoded output; (4) press Enter or click the button; and (5) start the sequence again. Testers should be able to close the form by clicking the close button you placed on the form. Make it easy for testers to use the keyboard by defaulting, setting focus, and changing the caption on the Decode key to read Clear when input fields have been decoded.

Scoring. The graders will enter a variety of data from a scoring script. Your program should ignore all noncoded characters as shown in the examples below. Graders will enter impossible dates, such as 2/31/1998 (see irregular input below), and all date entry will be for the 20th century only. You will loose points if you have more than two buttons (cmdDecodeClear and cmdClose) and more than two text boxes (txtInput and txtOutput).

Remember that eventually your decoding engine is not going to be used in an interactive setting. Users will not be typing in the codes. Rather, codes will flow from a large input file under control of another program. Therefore, it is not necessary or desirable to give messages to the operator. Instead, always provide output. If the input is irregular, then the output should read #ERROR# .

Requirement Statement for Assignment 3

Project Goal

The goal of this assignment is to develop an accurate Windows 2000 software program for decoding encrypted data. The engine must decode four categories of encrypted fields: dates, integers, floating-point numbers, and currency. Later, after accuracy has been verified, the engine will be applied to a database. For now, fuel for the engine will be limited to keyboard input of samples of encrypted fields. The program will display each decoded result singly for inspection and verification.

Application Description

The stand-alone application in this initial phase will be written in VBA using Access 2000. It will provide an interface for testers to use entering samples of encrypted data fields, and it will display decoded results. The nucleus of the application will be the decoding engine. It must be self-contained, because later, after it has been verified, it is to be dropped intact (copied) into a more complex database application.

Component Descriptions

User Interface

The users (i.e., the testers) will work from an extensive list of encrypted data fields. They will be instructed to enter the items on screen to verify that the decoded results are accurate according to the table below. The interface form should provide one field for input and one for output. Input should utilize the keyboard exclusively until the tester wants to close the form by clicking a button.

Decoding Engine

A special character prefixes each input field. Uppercase letters A - I represent numbers 1 - 9, and Z represents zero. Other letters are used for padding and distraction and should be ignored.

Code CategoriesExample InputExample InputOutput
+ integer +ABCD
+aAbBCDecimal 1234
- currency -GHD -01GH0OD $7.84
* date (yymmdd) *IFZDCZ
*IFZD12CZ April 30, 1996
# floating point
(no. decimal
places after #)

Quality Assurance

Test suites will be generated that consist of exemplars of input for each of the four code categories. (A study of the reasonable range of results to be expected in the database to be used later will guide the test sampling.) Testers will enter coded fields into the application from a printed, standard list (test suite) and transcribe the result into a space provided next to each item. They will then check each result for accuracy. A QA supervisor will verify that each tester is working appropriately by auditing their completed test suites.


Customer (name)__________________________________________  (signature)___________________  (date)______

Software Development Manager (name)______________________  (signature)___________________  (date)______

Quality Assurance Manager (name)_________________________  (signature)___________________  (date)______

Return to MIS 333k Syllabus