After showing the menu, the account needs to be split in two separate accounts, one for checking and one for savings.   This means variables are to be added to correspond to the different accounts and keep the transactions separated. The variables used will display for checking balance, checking withdraw, checking deposit, savings balance, savings withdraw, and savings deposit. Also, it will no longer be assumed the user only wants to do one transaction, and will very this with a do while loop.  
As before, the user will be greeted with “Please enter your PIN”, after being verified to access the account, the user chooses between savings or checking using a case control statement. A new variable sAccountType will be used, with values of “A” for Checking and “B” for Savings.  

Case of sAccountType
Case “A”:
  InputMsgBox(“Choose an option for Checking: A deposit B withdraw C balance D exit)
Case   “B”:
  InputMsgBox(“Choose an option for Checking: A deposit B withdraw C balance D exit)
  Case Other:
  MsgBox(Not a valid entry, please try again )
End Case

The “do while” control will require initializing a Boolean variable bAnotherTransaction to true, then asking at the end of each transaction if the user wishes to complete another transaction. If the user does, the variable is left to be true and the loop repeats. If the user does not wish another transaction, or inputs an incorrect value, the Boolean variable, bAnotherTransaction, is set to false, the loop exits and the end farewell is displayed.
In order to set the variable with a Boolean value, we have to ask the user for a string, Y or N.   Then we check to string returned using an if statement to assign the Boolean value, since a message box must return a string and cannot recognize a Boolean value.







Write program in a while loop

var sAnotherTransaction = string;
var bAnotherTransaction = boolean;
var fBalChk = float;
var fWdChk = float;
var fDepChk = float;
var fBalSav =... [continues]

Read full essay

Cite This Essay

APA

(2012, 03). Prgram Loop for Atm Process Prg/211. StudyMode.com. Retrieved 03, 2012, from http://www.studymode.com/essays/Prgram-Loop-For-Atm-Process-Prg-211-951385.html

MLA

"Prgram Loop for Atm Process Prg/211" StudyMode.com. 03 2012. 03 2012 <http://www.studymode.com/essays/Prgram-Loop-For-Atm-Process-Prg-211-951385.html>.

CHICAGO

"Prgram Loop for Atm Process Prg/211." StudyMode.com. 03, 2012. Accessed 03, 2012. http://www.studymode.com/essays/Prgram-Loop-For-Atm-Process-Prg-211-951385.html.