C++ Project – Banking Management System
Master C++ with Real-time Projects and Kickstart Your Career Start Now!!
Program 1
// Bank Application
#include<iostream>
using namespace std;
class Bank
{
private:
int accno;
string name;
int balance;
public:
Bank()
{
balance=0;
}
void create_account();
void deposit_amount();
void withd_amount();
void display();
};
void Bank::create_account()
{
cout<<"\nEnter account no: ";
cin>>accno;
cout<<"\nEnter name: ";
cin>>name;
}
void Bank:: deposit_amount()
{
int amt;
cout<<"\n Enter amonut for deposit :";
cin>>amt;
balance+=amt;
cout<<"\n Current balance is : "<<balance;
}
void Bank:: withd_amount()
{
int amt;
cout<<"\nEnter amonut for withdrawal :";
cin>>amt;
if(amt>balance)
cout<<"\nInsuffcient balance";
else
{
balance-=amt;
cout<<"\n Current balance is : "<<balance;
}
}
void Bank::display()
{
cout<<"\n Account No: "<<accno;
cout<<"\n Name: "<<name;
cout<<"\n Current balance is : "<<balance;
}
int main()
{
system("cls");
int choice;
Bank B1;
do
{
cout<<"\n---------SBI Bank Application-----------";
cout<<"\n 1. Create Account";
cout<<"\n 2. Deposit Amount";
cout<<"\n 3. Withdrawal Amount";
cout<<"\n 4. Display";
cout<<"\n 5. Exit";
cout<<"\n-----------------------------------------";
cout<<"\n Enter your choice: ";
cin>>choice;
switch(choice)
{
case 1: B1.create_account();break;
case 2: B1.deposit_amount();break;
case 3: B1.withd_amount();break;
case 4: B1.display();break;
case 5:break;
default:cout<<"\n Invalid choice";
}
}while(choice!=5);
return 0;
}
You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

