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

Name: _________________________

Planning Materials (8 points): ______________


Project (17 points): ______________

Homework #1
CIS 166 – Visual Basic

Create a project that allows you to calculate your checking account balance. This
project is to familiarize you with the .Net interface and working with basic Windows
controls. Prepare planning documents that describe the work to be performed. 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. Do not include any files except
those needed for your project.

Your form should include the following features:


• A text box to enter the transaction amount;
• A text box to specify the type of transaction (deposit, withdrawal, service fee);
• A text box to enter the date of the transaction;
• A label displaying the current balance;
• A button to calculate the new balance;
• A button to clear the form for a new transaction;
• A button to reset account to zero;
• A button to exit the application.

Include other labels and form caption as appropriate. Do not use other controls for
the user interface.

Your project code should include the following:


• Use a variable to store the current balance.
• Determine if the transaction amount should be added to or subtracted from the
current balance based on the type of transaction.
• Read values from the text boxes into variables to work with the data. Do not use
controls other than textboxes for data entry.
• Test the transaction value entered to make sure that it is a positive number.
• Make sure that the user has entered a valid type of transaction (Deposit,
Withdrawal, Service Fee).
• Test the contents of the date text box to ensure that an actual date is entered,
and that the date is on or before the current date.
• Inform the user of any invalid entry and return to the appropriate control for
correcting data. Do not process any transaction that has invalid data.
• Do not allow any transaction that will make the account balance negative, and
inform the user that the transaction will not be processed and why.
• Format the current balance to display as currency.

12/18/07

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