You have been hired as a programmer by a major bank. Your first project is a small banking transaction system. Each account consists of a number and a balance. The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, and balance inquiries. The application consists of the following functions:
N- New account
W- Withdrawal
D- Deposit
B- Balance
Q- Quit
X- Delete Account
Use the following function to produce the menu: void menu(); Your task for this tutorial is develop that function which displays the menu. The main program then prompts the user for a selection. You should verify that the user has typed in a valid selection (otherwise print out an error message and repeat the prompt).
CAN SOMEONE PLEASE WRITE THIS PROGRAM IN C++ AND MAKE SURE IT WORKS- IVE BEEN LOOKING AT SIMILAR PROGRAMS THAT ARE ALREADY ON CHEGG BUT THEY ALL HAVE ERRORS. USUALLY STATING "NO SUCH FILE OR DIRECTORY". THANK YOU
Program Screen Shot:
Sample output:
Program code to copy:
#include<iostream>
using namespace std;
//make Account number & Balance Global variable because we
need them in every function
string accountNo;
double balance;
//A function for showing menu to the user
void menu(){
cout<<"\n\t\t\tN- New
account"<<endl;
cout<<"\n\t\t\tW- Withdrawal"<<endl;
cout<<"\n\t\t\tD- Deposit"<<endl;
cout<<"\n\t\t\tB- Balance"<<endl;
cout<<"\n\t\t\tQ- Quit"<<endl;
cout<<"\n\t\t\tX- Delete
Account"<<endl;
}
//Following are the functions specified in the statement
void newAccount(){
//Wants to create a new account
cout<<"\n\t\t\t<!---Going to create a new
Account--!>"<<endl;
cout<<"Enter account number: ";
cin>>accountNo;
cout<<"Enter your balance: ";
cin>>balance;
cout<<"\n\t\t\t************Account Created
successfully!!***************"<<endl;
}
void withdrawal(){
//Wants to withdraw amount
double withdrawAmount;
cout<<"Enter amount to withdraw: ";
cin>>withdrawAmount;
//check that balance is more than withdraw
if(balance >= withdrawAmount){
//deduct that amount from
customer's account balance
balance = balance -
withdrawAmount;
cout<<"\n\n\t\t\t***************$"<<withdrawAmount<<"
has been withdrawed sccessfully***************"<<endl;
} //else there is not enough amount in user account to
withdraw
else{
cout<<"\n\n\t\t\t***************There is not enough balance
in your account***************"<<endl;
}
}
void deposit(){
double depositAmount;
cout<<"Enter amount to deposit: ";
cin>>depositAmount;
//Adding that amount into user
balance
balance = balance + depositAmount;
cout<<"\n\t\t\t***************$"<<depositAmount<<"
has been successfully deposited in your
account***************"<<endl;
}
void Balance(){
//show user's account balance to him/her
cout<<"\n\t\t\t***************Your account
balance is
$"<<balance<<"***************"<<endl;
}
void quit(){
exit(0);
}
void deleteAccount(){
//Just delete the account by setting accountNO to null
& balance to 0
accountNo = "";
balance = 0.0;
cout<<"\n\t\t\t********Account deleted
successfully********"<<endl;
}
int main(){
//A string for account number & double variable
for balance
string accountNo="";
double balance= 0;
cout<<"\n\n\n\t\t\t\t\t----Banking Transaction
System----"<<endl;
//For selection of any option from menu, declaring a
char type variable
char opt;
//calling the function menu() as specified in the
statement
menu();
//After showing menu, taking input from user which
option he wants to select
cin>>opt;
//Now determine which he has entered & perform the
respective action
if(opt == 'N' || opt == 'n'){
newAccount();
//If he further wants to perfrom
some action, call main function again
main();
}
else if(opt == 'W' || opt == 'w'){
//wants to withdraw amount
withdrawal();
main();
}
else if(opt =='D' || opt == 'd'){
//Wants to deposit amount
deposit();
main();
}
else if(opt == 'B' || opt == 'b'){
Balance();
//If wants to perform further
action
main();
}
else if(opt == 'Q' || opt =='q'){
//just quit the program
quit();
}
else if(opt == 'X' || opt == 'x'){
deleteAccount();
main();
}
//If user enters invalid option
else{
cout<<"\n\t\t\t***************Error!!Invalid option...Try
Again!!***************"<<endl;
}
return 0;
}
-------------------------------------------------
COMMENT DOWN FOR ANY QUERIES.............
HIT A THUMBS UP IF YOU LIKE IT!!
You have been hired as a programmer by a major bank. Your first project is a...
Congratulations, you have been hired by Shaky Bank and Trust as a staff programmer. Your task for this assignment is to create a simple bank accounting system and demonstrate its use. Create an Account class as per the following specifications: three private instance variables: accountOwnerName (String), accountNumber (int) and balance (double) a single constructor with three arguments: the account owner's name, accountNumber and starting balance. In the constructor, initialize the instance variables with the provided parameter values. get and set...
Java project: A Bank Transaction System For A Regional Bank User Story A regional rural bank CEO wants to modernize banking experience for his customers by providing a computer solution for them to post the bank transactions in their savings and checking accounts from the comfort of their home. He has a vision of a system, which begins by displaying the starting balances for checking and savings account for a customer. The application first prompts the user to enter the...
1- TigerOne Bank is a local bank that intends to install a new automated teller machine (ATM) to allow its customers to perform basic financial transactions. Using the ATM machine users should be able to view their account balance, withdraw cash and deposit funds. The bank wants you to develop the software application that will be installed on the new ATM machines. The following are the requirements for the application: Users are uniquely identified by an account number and...
Textual menus work by showing text items where each item is numbered. The menu would have items 1 to n. The user makes a choice, then that causes a function to run, given the user made a valid choice. If the choice is invalid an error message is shown. Whatever choices was made, after the action of that choice happens, the menu repeats, unless the menu option is to quit. Such kind of menus are displayed from the code under...
Code should be written in C++ 2. [11] You have been hired by Shapes Calculator Menu Maker to create a C++ console application that prompts the user with a menu and various options. Starting from Lab03, prompt the user for a char value that corresponds to one of the following menu options: a. Sphere=4*pi"radius3 (hint: use a constant value for pi=3.1415) b. Right Circular Cylinder- piradius*height c. Rectangular Parallelepiped length *width height d. Cone-*pi*radius2 height 3 x. Exit menu. Implement...
Lance 1. Write a C++ program that manages a user's bank account. The program must but not limited to: (a) Display a menu for the user once the program runs. The menu display should be done through a user defined function with no parameters. The display should look like the below snapshot. (3 marks) ***********Welcome to the Bank Account Manager program helps you make cash withdrawals and deposits (b) Ask the user for his/her full name. (1.5 marks) (c) Ask...
program Java oop The project description As a programmer; you have been asked to write a program for a Hospital with the following The Hospital has several employees and each one of them has an ID, name, address, mobile number, email and salary. . The employees are divided into Administration staff: who have in addition to the previous information their position. Nurse: who have their rank and specialty stored in addition to the previous o o Doctor: who have the...
program Java oop The project description As a programmer; you have been asked to write a program for a Hospital with the following The Hospital has several employees and each one of them has an ID, name, address, mobile number, email and salary. . The employees are divided into Administration staff: who have in addition to the previous information their position. Nurse: who have their rank and specialty stored in addition to the previous o o Doctor: who have the...
Write a C++ program that prompts the user with the following menu options: Erase-ArrayContent Count-Words Quit 1. For Erase-ArrayContent option, write complete code for the C++ function Erase described below. The prototype for Erase function is as follow: void Erase( int a[ ], int * N, int * Search-Element) The function Erase should remove all occurrences of Search-Element from the array al). Note that array a[ ] is loaded with integer numbers entered by the user through the keyboard. N...
C programming SPTL You have been hired by a company that makes keyboards. The company is doing a test to see which keys on the keyboard are used the most and the least. The assumption is the keys used the most will have to have better hardware and the keys used the least can have cheaper hardware. In order to be competitive in the marketplace, it is important to obtain data on the use of the keys on the keyboard...