Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program called assignment3.cpp that will implement a banking interface menu to deposit, withdraw, transfer or to display balance for a users checking

Write a C++ program called "assignment3.cpp" that will implement a banking interface menu to deposit, withdraw, transfer or to display balance for a users checking and savings account at the bank. In the beginning, the user is prompted to choose an action (deposit, withdraw, transfer or display balance), then the user is prompted to choose which account (checking or savings) to deposit/withdraw/transfer/ display balance from. Depending on the users choice you should add/deduct/display balance. By default, the current balance is shown for the checking and for the savings account at the end of a transaction, regardless of the user's choice.

It is assumed that the starting balance for the checking account is $200.00 and starting balance for the savings account is $800.00 (i.e. you will declare the amounts as such)

In your program you are expected to use SWITCH statements and other decision control statements, and input/output objects that you have already learnt about.

User inputs can have two decimal points.

You are also expected to check for input errors and should print out error messages if invalid inputs are entered. Users can not enter a negative value for deposit / withdrawal or more than the available balance in the selected account.

If the user chooses to deposit/withdraw/transfer/display balance-

you should prompt the user to choose from checking or savings If the user has chosen to deposit/withdraw/transfer an amount

you should then prompt the user to enter the amount (error message is shown if the amount is negative or (in case of withdraw or transfer) more than the available amount in that account) If the user has chosen to transfer an amount-

you should then prompt the user to confirm the account where the amount should be transferred to- checking or savings

Sample Output Below are sample outputs with input in bold and underlined. Your output does not need to match directly.

Sample 1

WELCOME TO SBC BANK What would you like to do today?

1) Deposit

2) Withdraw

3) Transfer

4) Display Balance

Your choice is: 3

Please choose the account:

C for Checking

S for Savings

Your choice is: S

Please enter the amount you would like to transfer $800.87

!!!You have entered an invalid amount!!!

Your current balance in Checking Account is $200.00

Your current balance in Savings Account is $800.00

Sample 2

WELCOME TO SBC BANK

What would you like to do today?

1) Deposit

2) Withdraw

3) Transfer

4) Display Balance

Your choice is: 1

Please choose the account:

C for Checking

S for Savings

Your choice is: C

Please enter the amount you would like to deposit: $150.75

Your current balance in Checking Account is $350.75

Your current balance in Savings Account is $800.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions