Create a program, in the programming language of your choice (C++, C#, Java), to allow the user to deposit or withdraw money from their bank
Create a program, in the programming language of your choice (C++, C#, Java), to allow the user to deposit or withdraw money from their bank account. Have them enter their name before making any transactions. Make sure you get an initial deposit from the user before they can withdraw any money. After each transaction, display the current balance for the user. Allow the user to make multiple transactions. Add code to make sure the user does not overdraw on their account.
You may use the following flowchart to help you with the logic of this program:
Main String name Output "Enter name:" Input name Real balance balance = 0.0 Real deposit deposit = 0.0 Real withdrawal withdrawal = 0.0 String transaction Output "Enter transaction type (D to deposit, W to withdraw, Q to quit)" Input transaction transaction != "Q" False End True False balance balance - withdrawal balance withdrawal True False Output "You do not have enough money in your account to make that size of withdrawal Input withdrawal balance == 0.0 True False Output "Enter amount of transaction" Output "You cannot make al withdraw until you deposit money into your account" transaction == "D" Output "Your balance is $" & ToFixed(balance, 2) balance balance + deposit Output "Enter transaction type (D to deposit, W to withdraw, Q to quit)" True Input transaction Input deposit
Step by Step Solution
3.55 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
Step 13 I am providing the code in C here include include class BankAccount private stdstring accountHolderName double balance public BankAccountconst stdstring name accountHolderNamename balance00 vo...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started