Question: C++ PROGRAM Write a program called StatBank.cpp that implements a tunction to track the current balance ot a bank account. The user has the option

C++ PROGRAM  C++ PROGRAM Write a program called StatBank.cpp that implements a tunction

Write a program called StatBank.cpp that implements a tunction to track the current balance ot a bank account. The user has the option to deposit or withdraw money, but do not allow an overdraft of the account (negative balance). The program MUST contain the following features: The balance-tracking function must use a static local variable to store the balance. User input must be handled in main(): o Ask for a transaction amount o Update the balance via your balance-tracking function o Ask whether the user has any more transactions A sample run of the program is shown below COMPSC-121 Static Bank Enter transaction amount(+ for deposit, - for withdrawal): 145.00 Current Balance: $145.00 Do you have another transaction (Y N)?y COMPSC-121 Static Bank Enter transaction amount ( for deposit, - for withdrawal): 25.00 Current Balance: $170.00 Do you have another transaction (Y N)? y COMPSC-121 Static Bank Enter transaction amount (+ for deposit, - for withdrawal): -30.00 Current Balance: $140.00 Do you have another transaction (Y N)? y COMPSC-121 Static Bank Enter transaction amount (+ for deposit,-for withdrawal):-150.00 Impermissible withdrawal, insufficient funds! Do you have another transaction (Y / N)? y COMPSC-121 Static Bank Enter transaction amount (+ for deposit, - for withdrawal): -15.00 Current Balance: $125.00 Do you have another transaction (Y / N)? n Final halance. S1 25 00 press anv kpy to cnnti n1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!