Вы находитесь на странице: 1из 1

Name: _________________________

Planning Materials (8 points): ______________


Project (17 points): ______________

Homework #7
CIS 166 – Transaction List

This exercise takes the checking account project and applies lists. 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.

Create a new project, and add the Transaction Class from Homework #7, making
any corrections identified in class or your homework. Create a new class named
TransactionList to manage the entered transactions, using a list to store the values.
Include the following capabilities in TransactionList:
• The ability to add a transaction as an object;
• The ability to remove a transaction from the list;
• The ability to refer to a single transaction in the list by index;
• The number of transactions in the list;
• The account balance;
• Whether the balance is negative (overdrawn).

Create a form with the following:


• A variable based on the TransactionList class to store data entered.
• 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
balance is less than zero (either by color, label, or messagebox). Refer to the
TransactionList variable for these values.
• A button to add a new transaction to the listbox and update the account balance
label.
• A button to remove a transaction from the listbox and display the revised
account balance.
• A button to clear textboxes and radio buttons for entering new transaction
details.
• A button to exit the application.

Extra Credit (5 points)

Modify the TransactionList class to include overloaded operators to add and remove
a transaction, and use the new operators in your form.

3/22/11

Вам также может понравиться