Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help to complete this assignment below as per c+++, Any modification is w

ID: 3868207 • Letter: I

Question

I need help to complete this assignment below as per c+++, Any modification is welcome and will be glad to see run output. Thank you

Minimum Requirements

You must provide a Word-style document explaining what your program does showing the expected runtime output.  Please advise me as to anything else that’s of importance to running it.

In this assignment you will create a program that allows a user to do the following:

Create a bank account by supplying a user id and password.

Login using their id and password.

Quit the program.

Now if login was successful the user will be able to do the following:

Withdraw money.

Deposit money.

Request balance.

Quit the program.

If login was not successful (for example the id or password did not match) then the user will be taken back to the introduction menu.

Explanation / Answer

#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
class bank
{
int amt,bal;
public:
string us="admin";
int pass=1234;
int ch,ch1;
string us1;
int pass1;
void create()
{
cout<<"Welcome to the Bank"<<endl;
cout<<"1.Login to Your Account"<<endl;
cout<<"2.Exit"<<endl;
cout<<"Enter your choice : ";
cin>>ch;
if (ch==1)
{
cout<<"Enter the id"<<endl;
cin>>us1;
cout<<"Enter the password"<<endl;
cin>>pass1;
if(us1==us && pass1==pass)
{
do{
cout<<"1.Withdraw money"<<endl;
cout<<"2.Deposit money"<<endl;
cout<<"3.Request balance"<<endl;
cout<<"4.Quit the program"<<endl;
cout<<"Enter your choice : ";
cin>>ch1;
switch(ch1)
{
case 1:
withdraw();
break;
case 2:
deposit();
break;
case 3:
balance();
break;
case 4:
exit(0);
break;
default:
cout<<"Invalid Choice";
break;
}
}while(ch1!=4);
}
else
exit(0);
}
else
exit(0);
}
void withdraw()
{
cout<<"Enter the amount to withdraw"<<endl;
cin>>amt;
if(amt>bal)
cout<<"Insufficient amount in the account";
else
bal=bal-amt;
cout<<"Amount withdrawn "<<amt<<endl;
}
void deposit()
{
cout<<"Enter the amount to deposit"<<endl;
cin>>amt;
bal=bal+amt;
cout<<"Amount deposited "<<amt<<endl;
}
void balance()
{
cout<<"Balance in your account "<<bal<<endl;
}
};
int main()
{   
bank obj;
obj.create();
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote