Bank Management System
Bank Management System
INDEX
S.No. Topics Page No
1. ACKNOWLEDGEMENT 3
2. CERTIFICATE 4
3. DESCRIPTION 5
4. FLOWCHART 6
5. DATA MEMBERS AND MEMBER FUNCTIONS 7
6. SOURCE CODE 9
7. BIBLIOGRAPHY 23
1|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Acknowledgement
I would like to express my special thanks of gratitude
to my teacher Mrs. Meenu Katal as well as our
principal Dr.V.K.Yadav who gave me the golden
opportunity to do this wonderful project on the topic
of Bank Management System, which also helped me in
doing a lot of Research and I came to know about so
many new things I am really thankful to them.
2|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Certificate
Student’s name . . . . . . . . . . . . . . . . . . . . . . . . . . Std . . . .
. Division . . . . . Roll No . . . . . . . . . . . . .
Signatures
_________ _________
Subject teacher Examiner
3|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Description
Our bank management interface comes with features like account
allotment which includes adding the details of the user including name,
age etc. This interface of ours also comes with the facility of checking the
details of an allotted account no. which will provide you with the details
of the account holder. The third feature of this interface is that it allows
the user to credit money into his/her account with real time balance
check. The next feature of this interface is that it allows you to withdraw
cash from it and provides you with real time changes in the account
balance. It also allows transferring money from one account to another
account and ensures security by asking the specific account numbers
given to each account holder. The last feature of this is that it displays all
the accounts on one screen. It also provides you with an option to exit at
any point. The pros of this are:
4|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Flowchart
5|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
MEMBER FUNCTIONS
void displayall(); To display all accounts opened in program account no., name,amount etc
6|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
void initializer(char n[40],int a,double am,int ag,int h,char l[40],double p); Initializes data members
by taking values from file
7|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Source Code
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <iomanip>
#include <fstream>
int i=0;
int bank_no(int);
void transfer(int,int);
class acount
{ char name[40];
int account_no;
int age;
int home_no;
char location[40];
public:
int agereturn();
8|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
void enterdata();
void display(int);
void displayall();
}x1[5];
int i;
for(i=0;i<=40;i++)
name[i]=n[i];
location[i]=l[i];
account_no=a;
amount=am;
age=ag;
home_no=h;
phone_no=p;
return age;
9|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
}
return amount;
{int phone;
ofstream datafile("account_detail.txt",ios::app);
gets(name);
cout<< "1.NAME-";
gets(name);
datafile<<name<<" ";
cout<<"\n2.AGE-";
cin>>age;
if(age<10||age>99)
return ; }
datafile<<age<<" ";
phone:
10 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
cout<<"\n3.MOBILE NUMBER -";
cin>>phone_no;
if(phone_no<1000000000||phone_no>9999999999)
goto phone;
datafile<<phone_no<<" ";
cout<<"\n4.ADRESS-: "<<endl;
cout<<"A.House no - ";
cin>>home_no;
gets(location);
gets(location);
phone=phone_no/100000000;
account_no=(i*1000000)+(10000*age)+(phone*100)+home_no;
cout<<"\n5.ACCOUNT NUMBER-:"<<account_no<<endl;
datafile<<account_no<<'\n'<<endl;
amount=0;
datafile.close();
if((x>=0)&&(x<=5))
11 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
{
cout<<"NAME :";
puts(name);
cout<<"AGE :"<<age<<endl;
puts(location);
cout<<endl;
amount=amount+j;
if(j>amount)
12 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
cout<<"\nYOU DON'T HAVE ENOUGH MONEY!"<<endl;
return;
else
amount=amount-j;
if(y==0)
amount=amount+z;
else if(y==1)
amount=amount-z;
int main()
fstream filin("account_detail.txt",ios::in);
13 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
fstream amount1("amount.txt",ios::in);
fstream eye1("eye.txt",ios::in);
eye1>>i;
eye1.close();
int j,y,a,b,ag,ac,h,q;
char ch,n[40],loc[40];
for(q=0;q<=5;q++)
filin>>n>>ag>>p>>h>>loc>>ac;
amount1>>am;
cout<<"\n"<<endl;
x1[q].initializer(n,ac,am,ag,h,loc,p);
filin.close();
amount1.close();
do{
cout<<"\n------------------------------------------------------------------------------"<<endl;
cout<<"1.Create an account"<<endl;
cout<<"3.Deposit money"<<endl;
cout<<"4.withdraw money"<<endl;
14 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
cout<<"5.show all accounts"<<endl;
cout<<"6.transfer money"<<endl;
cout<<"0.EXIT\n"<<endl;
cout<<"------"<<endl;
cin>>ch;
cout<<"------"<<endl;
if(((ch>'a')&&(ch<'z'))||((ch>'A')&&(ch<'Z'))||((ch>'6')&&(ch<'0')))
cout<<"WRONG KEY"<<endl;
else{
switch(ch)
case '1':
x1[i].enterdata();
i=i+1;
cout<<"\n"<<endl;
break;
case '2':
cin>>y;
15 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
j=bank_no(y);
if(j==-1)
else
x1[j].display(j);}
break;
cin>>y;
j=bank_no(y);
if(j==-1)
else
cin>>A;
x1[j].deposit(A);}
break;
case'4':
cin>>y;
j=bank_no(y);
16 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
if(j==-1)
else
{t=x1[j].amountreturn();
if(t==0)
break;
else
cin>>A;
if(A>t)
cout<<"\n"<<endl;
cout<<"\n"<<endl;
else
x1[j].withdraw(A);}
17 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
break;
break;
case'5':
cout<<"-----------------------------------------------------"<<endl;
cout<<"-----------------------------------------------------"<<endl;
for(q=0;q<i;q++)
x1[q].displayall();
break;
case'6':
start0:
cin>>y;
a=bank_no(y);
if(a==-1)
goto start0;
start:
18 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
cout<<"ENTER THE DESTINATION ACCOUNT NO."<<endl;
cin>>j;
b=bank_no(j);
if(b==-1)
goto start;}
if(j==y)
cout<<"-----------------------------------------------------------\n"<<endl;
goto start0;
} else
transfer(a,b);
}}
}while(ch!='0');
fstream amount("amount.txt",ios::out);
for(q=0;q<i;q++)
{ am=x1[q].amountreturn();
cout<<"am="<<am<<endl;
amount<<am<<"\n";
amount.close();
fstream eye("eye.txt",ios::out);
eye<<i<<"\n";
19 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
eye.close();
return 0;
int bank_no(int a)
{int y,j;
int i=a/1000000;
j=x1[i].agereturn();
y=(a/10000)-(i*100);
if(y!=j)
return -1;
else
return i;
{long int i;
long double a;
cin>>i;
a=x1[x].amountreturn();
if(a<i)
20 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
{ cout<<"\n------------------------------------------------------"<<endl;
cout<<"AMOUNT="<<a<<endl;
cout<<"------------------------------------------------------\n"<<endl;
return ; }
x1[x].editamount(1,i);
x1[y].editamount(0,i);
cout<<"TRANSFER SUCCESFULL"<<endl;
21 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
Bibliography
22 | P a g e