You are on page 1of 26

BANKER’S AND CUSTOMER’S BANK MANGEMENT SYSTEM

A MINI-PROJECT REPORT

Submitted By:
KIRAN.M-ENG17CS0111
K DEVA BHARGAV-ENG17CS0107
GOWTHAM R –ENG17CS0078
MANASA S –ENG17CS0119

of
BACHELOR OF TECHNOLOGY
in
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

at
DAYANANDA SAGAR UNIVERSITY

SCHOOL OF ENGINEERING, BANGALORE-560068

5TH SEMESTER

(Course Code: 16CS305)

OBJECT ORIENTED PROGRAMMING

1
DAYANANDA SAGAR UNIVERSITY

CERTIFICATE

This is to certify that the Algorithm Design and Analysis Laboratory Mini-Project
report entitled “BANKER’S AND CUSTOMER’S BANK MANGEMENT
SYSTEM” being submitted by to Department of Computer Science and
Engineering, School of Engineering, Dayananda Sagar University, Bangalore, for
the 5th semester B.Tech C.S.E of this university during the academic year

2017-2018.

Date:___________ ____________________________

Signature of the Faculty in Charge

____________________________

Signature of the Chairman

2
ACKNOWLEDGEMENT

We are pleased to acknowledge Dr. Girish for her invaluable guidance, support, motivation
and patience during the course of this mini- project work.
We extend our sincere thanks to our Chairman Dr. Banga M.K who continuously
helped us throughout the project and without his guidance, this project would have been an uphill
task.
We have received a great deal of guidance and co-operation from our friends and we
wish to thank one and all that have directly or indirectly helped us in the successful completion
of this mini-project work.

KIRAN.M-ENG17CS0111
K DEVA BHARGAV-ENG17CS0107
GOWTHAM R –ENG17CS0078
MANASA S –ENG17CS0119

3
TABLE OF CONTENTS

SL.NO TITLE Page No


Cover Page 1

Certificate 2

Acknowledgement 3

Contents 4

1. Problem Statement 5

2. Abstract 6

3. Introduction 7

4. S/W & H/W Requirements 8

5. Code 9

6. Expected Output Analysis 35

7. Conclusion 41

8. References 42

4
1. PROBLEM STATEMENT

The bank management system is an application for maintaining a person’s account in a bank.
The system provides the access to the customer to create an account, deposit/withdraw/view
balance(the cash from his account), also to view reports of all account present and can also
update any his personal information like phone number, address.

5
2. ABSTRACT

As we are beginners and have no practical experience in the field of software development and
moreover the Banking System is very wide. So, we limit the scope if our project by
computerizing the following fields of the Banking System:-

 Account Opening
 Daily Transactions
 Account Maintenance
 Search :-
1. Savings Account
2. Current Account
3. Fixed Deposit Account
 1 Year
 2 Years
 3 Years

6
3. INTRODUCTION

During the past several decades personal function has been transformed from a relatively obscure
record keeping staff to central and top level management function. There are many factors that
have influenced this transformation like technological advances, professionalism, and general
recognition of human beings as most important resources.

This project intends to introduce more user friendliness in the various activities such as record
updation, maintenance, and searching. The searching of record has been made quite simple as all
the details of the customer can be obtained by simply keying in the identification or account
number of that customer. Similarly, record maintenance and updation can also be accomplished
by using the account number with all the details being automatically generated. These details are
also being promptly automatically updated in the master file thus keeping the record absolutely
up-to-date.

The entire information has maintained in the FILES and whoever wants to retrieve can’t retrieve,
only authorization user can retrieve the necessary information which can be easily be accessible
from the file.

7
4. SOFTWARE AND HARDWARE REQUIREMENTS

Software requirements:-

 Ubuntu (16.04)
 Codeblocks

Hardware requirements:-

 PC or Laptop
 RAM min- 512 MB
 Hard disk space-500MB

8
5. CODE

#include<iostream>
#include<fstream>
#include<cctype>
#include<cstring>
#include<string>
#include<iomanip>
using namespace std;

class account
{
int acno;
char name[50];
int deposit;
char type;
public:
void create_account();
void show_account() const;
void modify();
void dep(int);
void draw(int);
void report() const;
int retacno() const;
int retdeposit() const;
char rettype() const;
};

void account::create_account()
{
cout<<"\n\t\t\tEnter the Account No. : ";
cin>>acno;
cout<<"\n\n\t\t\tEnter the Name of the Account holder : ";
cin.ignore();
cin.getline(name,50);
cout<<"\n\t\t\tEnter Type of the Account (C/S) : ";
cin>>type;
type=toupper(type);
cout<<"\n\t\t\tEnter The Initial amount : ";
cin>>deposit;
cout<<"\n\n\t\t\tAccount Created..";
}

9
void account::show_account() const
{
cout<<"\n\t\t\tAccount No. : "<<acno;
cout<<"\n\t\t\tAccount Holder Name : ";
cout<<name;
cout<<"\n\t\t\tType of Account : "<<type;
cout<<"\n\t\t\tBalance amount : "<<deposit;
}

void account::modify()
{
cout<<"\n\t\t\tAccount No. : "<<acno;
cout<<"\n\t\t\tModify Account Holder Name : ";
cin.ignore();
cin.getline(name,50);
cout<<"\n\t\t\tModify Type of Account : ";
cin>>type;
type=toupper(type);
cout<<"\n\t\t\tModify Balance amount : ";
cin>>deposit;
}

void account::dep(int x)
{
deposit+=x;
}

void account::draw(int x)
{
deposit-=x;
}

void account::report() const


{
cout<<acno<<setw(10)<<" "<<name<<setw(10)<<"
"<<type<<setw(6)<<deposit<<endl;
}

int account::retacno() const


{
return acno;
}

int account::retdeposit() const


{
return deposit;
}

char account::rettype() const

10
{
return type;
}

void write_account();
void display_sp(int);
void modify_account(int);
void delete_account(int);
void display_all();
void deposit_withdraw(int, int);
void cust();
void emp();

int main()
{
int a=0;
char n;string pass;
string passr("abcbank");
cout<<"\n\n\t\t\t\t======================\n";
cout<<"\t\t\t\tBANK MANAGEMENT SYSTEM";
cout<<"\n\t\t\t\t======================\n";
cout<<"\n\t\t\t\tDo you want login as:\n\t\t\t\t1.Bank
Employee\n\t\t\t\t2.Costumer";
cin>>n;
switch(n)
{
case '1':
cout<<"\n\t\t\t Enter the password :";
cin>>pass;
if(pass==passr)
{
emp();
}
else
{
cout<<"\n\t\t\t***WRONG PASSWWORD***\n ";
main();
}
break;
case '2':
cust();
break;
default :
exit(1);
}
}

void cust()
{

11
char ch;
int num;
do
{
cout<<"\n\n\t\t\t\t======================\n";
cout<<"\t\t\t\tWELCOME CUSTOMER";
cout<<"\n\t\t\t\t======================\n";

cout<<"\t\t\t\t ::MAIN MENU::\n";


cout<<"\n\t\t\t\t1. DEPOSIT AMOUNT";
cout<<"\n\t\t\t\t2. WITHDRAW AMOUNT";
cout<<"\n\t\t\t\t3. BALANCE ENQUIRY";
cout<<"\n\t\t\t\t4. EXIT";
cout<<"\n\n\t\t\t\tSelect Your Option (1-4): ";
cin>>ch;

switch(ch)
{
case '1':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
deposit_withdraw(num, 1);
break;
case '2':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
deposit_withdraw(num, 2);
break;
case '3':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
display_sp(num);
break;
case '4':
cout<<"\n\n\t\t\tPrepared by\n\n\t\t\t1.Kiran
M\n\n\t\t\t2.Deva Bhargav\n\n\t\t\t3.Gowtham R\n\n\t\t\t4.Manasa S";
break;
default :cout<<"\a";
}
cin.ignore();
cin.get();
}while(ch!='4');
}
void emp()
{
char ch;
int num;
do
{
cout<<"\n\n\t\t\t\t======================\n";
cout<<"\t\t\t\tWELCOME EMPLOYEE";
cout<<"\n\t\t\t\t======================\n";

12
cout<<"\t\t\t\t ::MAIN MENU::\n";
cout<<"\n\t\t\t\t1. NEW ACCOUNT";
cout<<"\n\t\t\t\t2. DEPOSIT AMOUNT";
cout<<"\n\t\t\t\t3. WITHDRAW AMOUNT";
cout<<"\n\t\t\t\t4. ALL ACCOUNT HOLDER LIST";
cout<<"\n\t\t\t\t5. CLOSE AN ACCOUNT";
cout<<"\n\t\t\t\t6. MODIFY AN ACCOUNT";
cout<<"\n\t\t\t\t7. EXIT";
cout<<"\n\n\t\t\t\tSelect Your Option (1-7): ";
cin>>ch;

switch(ch)
{
case '1':
write_account();
break;
case '2':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
deposit_withdraw(num, 1);
break;
case '3':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
deposit_withdraw(num, 2);
break;
case '4':
display_all();
break;
case '5':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
delete_account(num);
break;
case '6':
cout<<"\n\n\t\t\tEnter The account No. : ";
cin>>num;
modify_account(num);
break;
case '7':
cout<<"\n\n\t\t\tPrepared by :\n 1.Kiran M \n
2.Deva Bhargav K\n 3.Gowtham R\n 4.Manasa S ";
break;
default :cout<<"\a";
}
cin.ignore();
cin.get();
}while(ch!='7');

13
void write_account()
{
account ac;
ofstream outFile;
outFile.open("account.dat",ios::binary|ios::app);
ac.create_account();
outFile.write(reinterpret_cast<char *> (&ac),
sizeof(account));
outFile.close();
}

void display_sp(int n)
{
account ac;
bool flag=false;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
cout<<"\n\t\t\tBALANCE DETAILS\n";
while(inFile.read(reinterpret_cast<char *> (&ac),
sizeof(account)))
{
if(ac.retacno()==n)
{
ac.show_account();
flag=true;
}
}
inFile.close();
if(flag==false)
cout<<"\n\n\t\t\tAccount number does not exist";
}

void modify_account(int n)
{
bool found=false;
account ac;
fstream File;
File.open("account.dat",ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
return;
}
while(!File.eof() && found==false)

14
{
File.read(reinterpret_cast<char *> (&ac),
sizeof(account));
if(ac.retacno()==n)
{
ac.show_account();
cout<<"\n\n\t\t\tEnter The New Details of
account"<<endl;
ac.modify();
int pos=(-
1)*static_cast<int>(sizeof(account));
File.seekp(pos,ios::cur); //fncallat1353
File.write(reinterpret_cast<char *> (&ac),
sizeof(account));
cout<<"\n\n\t\t\tRecord Updated";
found=true;
}
}
File.close();
if(found==false)
cout<<"\n\n\t\t\tRecord Not Found ";
}

void delete_account(int n)
{
account ac;
ifstream inFile;
ofstream outFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
outFile.open("Temp.dat",ios::binary);
inFile.seekg(0,ios::beg);
while(inFile.read(reinterpret_cast<char *> (&ac),
sizeof(account)))
{
if(ac.retacno()!=n)
{
outFile.write(reinterpret_cast<char *> (&ac),
sizeof(account));
}
}
inFile.close();
outFile.close();
remove("account.dat");
rename("Temp.dat","account.dat");
cout<<"\n\nRecord Deleted ..";

15
}

void display_all()
{
system("CLS");
account ac;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !! Press any Key...";
return;
}
cout<<"\n\n\t\tACCOUNT HOLDER LIST\n\n";

cout<<"====================================================\n";
cout<<"A/c no. NAME Type Balance\n";

cout<<"====================================================\n";
while(inFile.read(reinterpret_cast<char *> (&ac),
sizeof(account)))
{
ac.report();
}
inFile.close();
}

void deposit_withdraw(int n, int option)


{
int amt;
bool found=false;
account ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
{
cout<<"File could not be open !! Press any Key...";
return;
}
while(!File.eof() && found==false)
{
File.read(reinterpret_cast<char *> (&ac),
sizeof(account));
if(ac.retacno()==n)
{
ac.show_account();
if(option==1)
{
cout<<"\n\n\t\t\tTO DEPOSITSS AMOUNT";

16
cout<<"\n\n\t\t\tEnter The amount to
be deposited: ";
cin>>amt;
ac.dep(amt);
}
if(option==2)
{
cout<<"\n\n\t\t\tTO WITHDRAW AMOUNT";
cout<<"\n\n\t\t\tEnter The amount to
be withdraw: ";
cin>>amt;
int bal=ac.retdeposit()-amt;
if(bal<0)
cout<<"Insufficience balance";
else
ac.draw(amt);
}
int pos=(-1)*static_cast<int>(sizeof(ac));
File.seekp(pos,ios::cur);//fn1353
File.write(reinterpret_cast<char *> (&ac),
sizeof(account));
cout<<"\n\n\t\t\tRecord Updated";
found=true;
}
}
File.close();
if(found==false)
cout<<"\n\n\t\t\tRecord Not Found ";
}

17
6. EXPECTED OUTPUT ANALYSIS

18
19
20
21
22
23
24
7. CONCLUSION

This project is developed to nurture the needs of a user in a banking sector by embedding all the
tasks of transactions taking place in bank.

Future version of this software will still be much enhanced than the current version 1.0. Thus the
bank management system it is developed and executed successfully.

25
8. REFERENCES

[1]https://github.com

[2] www.wikipedia.org

[3]www.codeproject.com

26

You might also like