Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lab Exercise: Creating a Banking App with Procedures for Checking & Savings, Lab Reports of Information Technology

A lab exercise for creating a banking application with procedures for computing new balances for checking and savings accounts. The user interface allows users to input their current balance, number of years, and type of account (checking or savings). The application computes new balances annually with given interest rates and may include a bonus. Step-by-step instructions for creating the user interface, writing the program, and testing the application.

Typology: Lab Reports

Pre 2010

Uploaded on 08/09/2009

koofers-user-diu
koofers-user-diu 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download Lab Exercise: Creating a Banking App with Procedures for Checking & Savings and more Lab Reports Information Technology in PDF only on Docsity! IST 256 Lab 11 – February 25, 2008 1. Writing an Application with a General Procedure Start a new project and name it something like BankProc (for banking with procedures). Create a user interface that assumes that the user has two different types of bank accounts. One part of the form will allow the user to compute a new checking account balance. A second part of the form with allow the user to compute a new savings account balance. The new balances will compound interest annually and may also give a bonus. For each type of account, ask the user for the current balance and the number of years that they want to compute. Give a button to compute the new balance for each account. You should also have either a TextBox or a Label for each account to show the result, and an extra one to show if they got a bonus. A final Close button is also nice. Then write the program to make the two Buttons compute the new account balance. To do this, write a general procedure that will compute the new balance. The procedure should take as parameters: A ByVal parameter that is the current balance (single) A ByVal parameter that is the number of years (integer) A ByVal parameter that is the annual rate (single) A ByRef parameter that is the new balance (single) A ByRef parameter that is the bonus message (string) Try to pick good variable names for the formal parameters in the heading of the procedure. The procedure should compute the new balance by using a loop that computes the new balance for each year from 1 to the number of years. At the end, if the new balance is greater than $1000, a bonus of $50 is added to the new balance. If a bonus was given, the bonus message should be set to say something like “A $50 bonus was added to your account”, and otherwise the bonus message will say “Sorry, no bonus this time.”. Then the button for the checking account will call the procedure with the user’s current balance and number of years that they typed in and an interest rate of .02. The button code should also include the declaration of a variable to hold the new balance and to hold the bonus message string. After the procedure call, the button will display the new balance variable and the bonus message. The button for the savings account will do almost the same thing, except that it calls the procedure with the user’s current balance, number of years, and an interest rate of .08. It, too, will display the values of the new balance and bonus messagevariables. Test your program to make sure that it works.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved