#includeusing namespace std…
#include<iostream> using namespace std; class Bank { private: char name[30]; char accname[20]; char acctype[20]; float ibalance; float depos; float with; int pass; public: void menu(void); void getdata(void); void deposite(void); void checkbal(void); void withdraw(void); void info(void); }; void Bank::menu() { int num; cout<<"\n\n\n\t********************************"; cout<<"\n Choose your Option:(1-to-6)\n"<<endl; cout<<" 1.Create An Account\n"; cout<<" 2.Deposite the Balance\n"; cout<<" 3.Check the Balance\n"; cout<<" 4.Withdraw the Balance\n"; cout<<" 5.See All Information\n"; cout<<" 6.Quit"; cout<<"\n\t********************************"; cout<<"\t\n\t"; cin>>num; switch(num) { case 1: getdata(); break; case 2: deposite(); break; case 3: checkbal(); break; case 4: withdraw(); break; case 5: info(); break; default: break; } } void Bank::getdata() { int go; cout<<"Enter the Name of Depositer:"; cin>>name; cout<<"Choose The Account Name:"; cin>>accname; cout<<"Which types of Account You wanna Create?"; cout<<"\t\t\t\t*Saving\n"; cout<<"\t\t\t\t*\n"; cout<<"\t\t\t\t*\n"; cout<<"\t\n\t"; cin>>acctype; cout<<"Deposite the Initial Balance:"; cin>>ibalance; cout<<"Choose your password[0-9] for secure (only 4 nos.):"; cin>>pass; cout<<"Account Has Been Successfully Created!!!"; cout<<"your account number is:HBL50000"<<pass; cout<<" Go to MainMenu:"; cin>>go; if(go==0) { menu(); } } void Bank::deposite() { int go; cout<<"How Much Money You wanna Deposite:"; cin>>depos; depos+=ibalance; cout<<"Your Balance Has Been Successfully Deposite!!!\n\n"; cout<<"for Go to MainMenu:"; cin>>go; if(go==0) { menu(); } } void Bank::checkbal() { int passcode; cout<<"Enter your Account's Password: "; cin>>passcode; if(pass==passcode) { int go; cout<<"Your Current Balance:"<<" Rs."<<depos<<"\n"; cout<<" for Go to MainMenu:"; cin>>go; if(go==0) { menu(); } } else cout<<"Sorry You Entered Wrong Password!!TRY AGAIN@"; } void Bank::withdraw() { int passcode; cout<<"Enter your Account's Password: "; cin>>passcode; if(pass==passcode) { int go; cout<<"How Much Money You wanna Withdraw:"; cin>>with; depos-=with; cout<<"After Withdraw Your Balance:"<<" Rs."<<depos<<"\n"; cout<<"for Go to MainMenu:"; cin>>go; if(go==0) { menu(); } } else cout<<"Sorry You Entered Wrong Password!!TRY AGAIN@"; } void Bank::info() { int passcode; cout<<"Enter your Account's Password: "; cin>>passcode; if(pass==passcode) { int go; cout<<"All Information is Listed Below:\n"; cout<<"Name of the Depositer:"<<name<<"\n"; cout<<"Name of the Account:"<<accname<<"\n"; cout<<"Type of the Account:"<<acctype<<"\n"; cout<<"Your Current Amount:"<<depos<<"\n"; cout<<" for Go to MainMenu:"; cin>>go; if(go==0) { menu(); } } else cout<<"Sorry You Entered Wrong Password!!TRY AGAIN@"; } int main() { Bank Obj,ob1; Obj.menu(); ob1.menu(); return 0; }