80% found this document useful (5 votes)
8K views22 pages

Bank Management System

IT CONTAINS SOURCE CODE AND WHOLE PROJECT FILE OF BANK MANAGEMENT SYSTEM WITH FLOW CHART FOR CLASS +2 OPTING C++

Uploaded by

abhay jaggi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
80% found this document useful (5 votes)
8K views22 pages

Bank Management System

IT CONTAINS SOURCE CODE AND WHOLE PROJECT FILE OF BANK MANAGEMENT SYSTEM WITH FLOW CHART FOR CLASS +2 OPTING C++

Uploaded by

abhay jaggi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

CLASS: XII.

B C++ PROJECT SESSION: 2019-2020

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.

Secondly I would also like to thank my parents and


friends who helped me a lot in finalizing this project
within the limited time frame.
I hope you will too acknowledge our efforts
optimistically.

2|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020

Certificate
Student’s name . . . . . . . . . . . . . . . . . . . . . . . . . . Std . . . .
. Division . . . . . Roll No . . . . . . . . . . . . .

This is to certify that Activities written in


the index have been performed by the
student satisfactorily

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:

• Meets user requirements.


• Best utilization of available resources.
• Develops a cost effective system.
• Develops a technically feasible system.

4|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020

Flowchart

5|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020

INSIDE CLASS ACOUNT----:


DATA MEMBERS

1. char name[40];J --: To enter account holders name

2. int account_no; --: To enter account number of user

3. long double amount; --: contains total amount of user

4. int age; --: contains age of user

5. int home_no; --: house number of user

6. char location[40]; --: address of user

7. long double phone_no; --: phone number of use

MEMBER FUNCTIONS

int agereturn(); To make age(data member) accessible

long double amountreturn(); To make amount(data member) accessible

void enterdata(); To enter details of user

void display(int); To display details of user, account no. required

void deposit(long double); To deposit money in account

void withdraw(long double); To withdraw money from account

void displayall(); To display all accounts opened in program account no., name,amount etc

void editamount(int,long int); to edit amount for transferring money

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

OTHER FUNCTIONS --:


1.int bank_no(int); INPUTS ACCOUNT_NO AND OUTPUTS ITS OBJECT NUMBER

2.void transfer(int,int); TAKES TWO ACCOUNT_NO AND TRANSFERS MONEY FROM


SOURCE ACCOUNT TO DESTINATION ACCOUNT

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>

using namespace std;

int i=0;

int bank_no(int);

void transfer(int,int);

class acount

{ char name[40];

int account_no;

long double amount;

int age;

int home_no;

char location[40];

long double phone_no;

public:

int agereturn();

long double amountreturn();

8|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
void enterdata();

void display(int);

void deposit(long double);

void withdraw(long double);

void displayall();

void editamount(int,long int);

void initializer(char n[40],int a,double am,int ag,int h,char l[40],double p);

}x1[5];

void acount ::initializer(char n[40],int a,double am,int ag,int h,char l[40],double p)

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;

int acount ::agereturn()

return age;

9|Page
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
}

long double acount ::amountreturn()

return amount;

void acount ::enterdata()

{int phone;

ofstream datafile("account_detail.txt",ios::app);

cout<<"\n ENTER YOUR DETAILS\n"<<endl;

gets(name);

cout<< "1.NAME-";

gets(name);

datafile<<name<<" ";

cout<<"\n2.AGE-";

cin>>age;

if(age<10||age>99)

{cout<<"\nSORRY YOU ARE NOT ELIGIBLE(age>10)\n"<<endl;

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)

cout<<"\nPLEASE ENTER A VALID NUMBER(10 digits)\n"<<endl;

goto phone;

datafile<<phone_no<<" ";

cout<<"\n4.ADRESS-: "<<endl;

cout<<"A.House no - ";

cin>>home_no;

gets(location);

cout<<"B.City address - ";

gets(location);

datafile<<home_no<<" "<<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();

void acount ::display(int x)

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;

cout<<"MOBILE NUMBER :"<<setprecision(10)<<phone_no<<endl;

cout<<"ADDRESS :"<<home_no<<" ";

puts(location);

cout<<endl;

cout<<" \nAMOUNT :"<<setprecision(10)<<amount<<" RS"<<endl;

void acount ::deposit(long double j)

amount=amount+j;

cout<<" AMOUNT ="<<setprecision(10)<<amount<<" RS"<<endl;

void acount ::withdraw(long double 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;

cout<<" AMOUNT="<<setprecision(10)<<amount<<" RS"<<endl;

void acount ::displayall()

cout<<setw(10)<<account_no<<setw(14)<<name<<" "<<setw(8)<<age<<" "<<setw(8)<<amount<<"


RS"<<endl;

void acount ::editamount(int y,long int z)

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;

long double A,t,am,p;

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();

cout<<"||||||||||||||||||||||||||||||| WELCOME TO TEXAS BANK ||||||||||||||||||||||\n


"<<endl;

cout << " MENU\n" << endl;

do{

cout<<"\n------------------------------------------------------------------------------"<<endl;

cout<<" ENTER YOUR CHOICE\n"<<endl;

cout<<"1.Create an account"<<endl;

cout<<"2.check your details"<<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':

cout<<"ENTER ACCOUNT NO -:";

cin>>y;

15 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
j=bank_no(y);

if(j==-1)

{cout<<"\nACCOUNT WITH AC.NO- "<<y<<" DOES NOT EXIST\n"<<endl;

else

x1[j].display(j);}

break;

case'3':cout<<"ENTER THE ACCOUNT NUMBER-";

cin>>y;

j=bank_no(y);

if(j==-1)

{cout<<"\nACCOUNT WITH AC.NO- "<<y<<" DOES NOT EXIST\n"<<endl;

else

{cout<<"\nENTER THE AMOUNT YOU WANT TO DEPOSIT- ";

cin>>A;

x1[j].deposit(A);}

break;

case'4':

cout<<"ENTER THE ACCOUNT NUMBER-";

cin>>y;

j=bank_no(y);

16 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
if(j==-1)

{cout<<"\nACCOUNT WITH AC.NO- "<<y<<" DOES NOT EXIST\n"<<endl;

else

{t=x1[j].amountreturn();

if(t==0)

{cout<<"\nPLEASE DEPOSIT SOME MONEY FIRST"<<endl;

break;

else

cout<<"\nENTER THE AMOUNT YOU WANT TO WITHDRAW- ";

cin>>A;

if(A>t)

cout<<"\n"<<endl;

cout<<"AMOUNT TO BE WITHDRAWN EXCEEDS TOTAL AMOUNT YOU HAVE"<<endl;

cout<<"\n"<<endl;

else

x1[j].withdraw(A);}

17 | P a g e
CLASS: XII.B C++ PROJECT SESSION: 2019-2020
break;

case '0': cout<<"-------------------------------------------------------------------------"<<endl;

cout<<" THANKS FOR USING\n"<<endl;

cout<<" -constructed by ABHAY JAGGI and DIKSHANT SHARMA @"<<endl;

break;

case'5':

cout<<"-----------------------------------------------------"<<endl;

cout<<" A/C NO. NAME AGE BALANCE "<<endl;

cout<<"-----------------------------------------------------"<<endl;

for(q=0;q<i;q++)

x1[q].displayall();

break;

case'6':

start0:

cout<<"ENTER THE SOURCE ACCOUNT NO."<<endl;

cin>>y;

a=bank_no(y);

if(a==-1)

{cout<<"\nACCOUNT WITH AC.NO- "<<y<<" DOES NOT EXIST\n"<<endl;

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)

{cout<<"\nACCOUNT WITH AC.NO- "<<j<<" DOES NOT EXIST\n"<<endl;

goto start;}

if(j==y)

cout<<"YOU ARE ENTERING SAME ACCOUNT NUMBER"<<endl;

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;

void transfer(int x,int y)

{long int i;

long double a;

cout<<"\nENTER THE AMOUNT TO BE TRANSFERRED\n"<<endl;

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<<"source account does not have enough money to transfer"<<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

1. www. youtube/programming .com


2. Computer sciences with C++ by Sumita Arora
3. www.wikihow/ programming.com
4. https://geeksforgeeks.org
5. Arihant All in one Class XII

22 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy