CIS 230

CIS 230 Visual Basic Programming Assignments

assignment 1 | assignment 2

 

The Programming Process -  It is essential that you follow the Three-Step Process. Read Ch. 1, pp. 4 & 5 of your textbook carefully. You must conscientiously follow these steps in order to be successful in writing programs efficiently. Students who do not have the patience to follow the steps WILL have difficulty completing the assignments.

1. Designing the user interface. - First you must completely understand the program's specifications. Ask you instructor any questions that you have regarding the specifications. Then, draw a sketch of what the user will see. Indicate the names that you plan to give to the form and its objects. In addition to drawing a sketch on blank paper, use the Event Procedures Planning Form to name and organize the objects you plan to use.

2. Plan the properties. - For each object, write down the properties that you plan to set or change on an Object/Properties Planning Form.

3. Plan the Basic code. - This step should be done  first as pseudocode. Then, you should write the actual code using VB syntax. Finally, you will type the code into VB. You must then debug the program. Finally, you must check the program by using a test plan that you developed BEFORE you wrote the code. Don't forget to make sure that internal documentation explains the algorithms in your code.


Documentation and Coding Standards - Hopefully, you will become a better problem-solver throughout this course. However, even if you write programs that follow the given specifications perfectly and work to the degree that they display the proper results, you may miss points if you do not follow the Documentation and Coding Standards. Read these guidelines thoroughly. If you have any questions, be sure to consult the instructor and your textbook. Take the time to check your program and code thoroughly before submitting it so that you do not lose points for violating the Standards.


Requirements for all assignments:

You must submit the printout the code and form image of all VB forms included with your project at the beginning of the class period on which it is due. You must also save a copy of that project (all .frm, .vbp, .bas files) in a folder with the name of the project on a floppy disk labeled with your name and the project title. Submit the whole project in a folder or binder labeled with your name and the name of the course. I must be able to read all of the code (particularly along the left margin) on each page even if it is stapled inside a binder. Securely enclose a floppy disk containing the project files into the folder so that it will not fall out.

Be sure to include the specified header in the general declarations section of each form. The input prompts that you provide to the user should be explanatory enough that practically anyone could understand and successfully execute your program. Make sure that your program includes internal documentation that explains your algorithm.


Assignment #1:

Do Programming Exercise 5.2  on p. 202 of your textbook. Save the project and startup form as "Assignment1JD", where 'JD' are your initials. Make sure that you include sufficient user interface (including all prompts, labels, and message boxes) which is clear and understandable. You must also include proper internal documentation and type the code following our Documentation and Coding Standards.

Specifications for Programming Exercise 5.2 on p. 202:

Redo the checking account programming exercises from Chapter 4 (4.3, 4.4, and 4.5 on p. 164) using a menu, as specified on p. 202, and general function and/or sub procedures where appropriate.

Use option buttons to indicate the type of transaction - deposit, check, or service charge. A text box will allow the user to enter the amount of the transaction. Display the balance in a label. Include validation that displays a message box if the amount of the transaction is a negative number. If there is not enough money to cover a check, display a message box with "Insufficient Funds." Do not pay the check, but deduct a service charge of $10. Use function procedures for deposits, checks, and service charges. The deposit function adds the deposit to the balance; the check function subtracts the transaction amount from the balance; the service charge function subtracts $10 from the balance. The Summary menu command displays the total number of deposits and the dollar amount of deposits, the number of cleared checks, and the dollar amount of the cleared checks in a message box. The Clear menu command clears the option buttons and the amount (currently showing in the text box) and resets the focus. The Color and Font menu commands change the color (ForeColor) and font of the information displayed in the balance label. Use a message box to display your name as the programmer for the About option on the Help menu.

Clarifications for 2000 Spring Term:

  1. The Calculate command button as described in 4.3 on p. 164 performs the same operations as the menu command Transaction in 5.2 on p. 202.
  2. You may leave the original command buttons on the form (as required in exercises 4.3 through 4.5 on p. 164) or you may remove them and require the user to access all of the program's functionality through the menu.
  3. The Calculate command should automatically clear the text box and option buttons in addition to performing the necessary calculations.
  4. The Clear command should clear the text box and the option buttons and reset the focus.
  5. Add each $10 service charge for bounced checks to the running total amount of checks which appears in the summary message box. However, do not add the number of $10 service charges (that is, the number of bounced checks) to the number of checks that displays in the summary message box. (This is explained in Exercise 4.5 on p. 164.)
  6. The service charge entries that the user makes in through the text box should not be added to the running total amount of checks as displayed in the summary message box. Of course, these service charge entries are debited against the overall checking account balance that appears in the label.

Sample executable file (revised) - If you believe that this model is not consistent with the specifications and clarifications above, contact the instructor.


Assignment #2:

Write a program that uses at least 3 of the following concepts (which have been introduced since Chapter 6): 

multiple forms, standard code module, static variable, splash screen, list box, combo box, For/Next loop, Do/Loop loop, string function(s), Select Case statement, control array, array of variables, user-defined data type, Printer object, table lookup, sequential access files, or random access files.

The program should have a purpose though. For example, it could be a game that you created or a practical program similar to the Checking Account Transaction project in Assignment #1. You could select any of the Programming Exercises listed at the end of any chapter and modify its specifications, if necessary, in order to make sure that it uses 3 (or more) of the necessary concepts. You can even visit popular Web sites such as http://www.planet-source-code.com/vb or http://www.vbcode.com for ideas, however you may not submit a program that was written entirely or in large part by someone else. If you do use excerpts of code from another source make sure that you clearly cite the original author/Web site within your internal documentation (with a name and URL Web address.) Overall, you must provide a sufficient amount of your own code in order to receive credit for the assignment.

There is no minimimum length for the project. You must provide a well-designed user interface and amply document the program. Make sure that the program follows the class Documentation and Coding Standards. Hand in the code for each form module stapled on top of its form image. Staple these sets (if your program had more than one form) on top of the code for the general code module (if you used one.) As described in the general requirements for all assignments above, you must submit the project in a folder with a floppy disk containing the files securely enclosed.

Exemplary Assignment #2 programs from former CIS 230 students:    Tom Wise - Fall 1999, more to come


CIS 230 Home Page | Minich.com Web Design