You are on page 1of 1

Name: _________________________

Planning Materials (8 points): ______________


Project (17 points): ______________

Homework #7
CIS 166 – Visual Basic

This exercise takes the checking account project and modifies the transaction class,
and adds an array. Your project will use a single form. 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.

Modify the Transaction class from Homework #6 or start with a new project. The
class should have the following read/write properties: TransactionDate,
TransactionType, TransactionAmount, Payee, and CheckNumber. Include shared
read-only properties for AccountBalance and Overdrawn. Overdrawn is a Boolean
value indicating if the AccountBalance is negative. Include a ToString method to
display account information. Include a method to adjust the AccountBalance.
Include shared functions to test the amount and date.

Create a form with the following:


• An array using the Transaction class with 20 elements.
• Radio buttons, labels and textboxes for entering data about each transaction
(radio buttons for transaction type).
• 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
textboxes and option buttons.
• 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 to the array and listbox, and update the
account balance label.
• A button to remove a transaction from the array and listbox, and display the
revised account balance.
• A button to clear textboxes and radio buttons for entering new transaction
details.
• A button to clear the listbox and array.
• A button to exit the application.

Include the following validation requirements:


• 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.

3/23/07

You might also like