You are on page 1of 2

Name: _________________________

Planning Materials (8 points): ______________


Project (17 points): ______________

Homework #4
CIS 166 – Visual Basic

This exercise takes the checking account project and uses an array to store the
data. Your project will use a single form. Note that the requirements are
different from previous assignments! Copy your project files in a folder to the
R: drive, and turn in a printed copy of your code, your planning documents, and this
sheet in a folder.

Create a structure called Transaction. The structure should have the following data
items: TransactionDate, TransactionType, TransactionAmount, Payee, and
CheckNumber. Include a ToString method that returns the transaction date, type of
transaction, and transaction amount as a concatenated string. The method should
return something similar to the following: "07/02/2003 Deposit $500.00".

Create a form with the following:


• An array based on the Transaction structure with 20 elements.
• A decimal variable to hold the account balance.
• Controls for entering data about each transaction.
• A listbox showing all transactions. When the user clicks on an item in the list box,
information about that transaction should be displayed in the appropriate
controls.
• Include a label for displaying the account balance. Notify the user if the account
is Overdrawn (either by color, label, or messagebox).
• A button to add a new transaction, display information in the listbox, and update
the account balance label.
• A button to clear textboxes and radio buttons for entering a new transaction.
• A button to remove a transaction from the listbox; this should also remove the
transaction from the array and display the revised account balance.
• A button to exit the application.

Include the following validation:


• The transaction amount should be tested to make sure it is a positive number.
• The transaction date should also be tested to be sure a date value has been
entered.
• Each transaction must have a transaction type specified (deposit, service fee,
withdrawal).
• If a transaction is a withdrawal, an entry must be made in the payee textbox.

Extra Credit (5 points)

3/23/07
A button to update a transaction in the array; this should also display the revised
account balance.

12/26/01

You might also like