Vous êtes sur la page 1sur 1

Name: _________________________

Planning Materials (8 points): ______________


Project (17 points): ______________

Homework #5
CIS 166 – Transaction Structure Array

This exercise takes the checking account project and uses a structure and an array
to store the data. Your project will use a single form. Note that the requirements
are different from Homework #4. 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.

A transaction includes the following values: Transaction Date, Transaction Type,


Transaction Amount, Payee, and Check Number. Include the following validation:
• The transaction amount must be a positive number.
• The transaction date must be readable as a date.
• Each transaction must have a transaction type specified (deposit, service fee,
withdrawal).
• If a transaction is a withdrawal, an entry for payee is required.

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.

3/22/11

Vous aimerez peut-être aussi