You are on page 1of 19

BANKING SYSTEM MANAGEMENT

SYSTEM DESCRIPTION

The bank management system is an application for maintaining a persons account


in a bank. The system provides the access to the customer to create an account,
deposit/withdraw the cash from his account, also to view reports of all accounts
present. The following presentation provides the specification for the system.
The main objective of this banking system which is developed in c++ is to provide
a flexible solutions for banking industry. With this system both type of users such
as bank customers and working personnel of the particular bank will find easy to
use and able to perform all their operations using this system.
This system enable its users to open and close the bank account. Customers will
able to withdraw and deposit amount to their particular account. It will also able to
generate transactions on money for particular Working personnel of the particular
bank will make to make all the operations which are required within the banking
premises. The operations which can be performed by the bank personnel are:
Adding new customer account, edit existing customer account, list all customer
details including their account number, able to generate daily and monthly business
transactions report etc. Its user friendly graphical mode will made its users to
customer account. Work with this new system in more interactive way.

BANKING SYSTEM MANAGEMENT

REQUIREMENT ANALYSIS

List of classes
1. class account
List of functions
1. void create_account();
2. void show_account();
3. void modify();
4. void dep(int);
5. void draw(int);
6. void report();
7. int retacno();
8. int retdeposit();
9. char rettype();
10.void write_account();
11. void display_sp(int);
12. void modify_account(int);
13. void delete_account(int);
14. void display_all();
15. void deposit_withdraw(int,int);
16. void intro();
List of files
1. account.dat

BANKING SYSTEM MANAGEMENT

HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE REQUIREMENTS
The hardware that is needed for our system is:
Processor (CPU)
:
Primary Memory (RAM):
System Type
:
Pen and Touch
:

Intel(R) Core(TM) i3-3110CPU@2.40


4GB
64 bit Operating system
No pen or touch input is available for this display

SOFTWARE REQUIREMENTS
C++ programming is the software used.

BANKING SYSTEM MANAGEMENT

DATA FLOW DIAGRAM

BANK
MANAGEMENT

Displaying
details of all
the account

Create an
account
Storage:
account.dat

Delete an
account
Display
details of an
account

Depositing
/withdrawing
amount
Modify an
account

BANKING SYSTEM MANAGEMENT

DATA DESIGN

MEMBERS
int acno;

DESCRIPTION
Account number

char name[50];

Name of the account holder

int deposit;

Deposit

char type

Type of account

BANKING SYSTEM MANAGEMENT

DATA DICTIONARY

MEMBER NAME
Account number

DATA TYPE
Integer()

Name

Character()

Deposit

Integer()

Type

Character()

DESCRIPTION
To store the account
number
To store the name of the
account holder
Provides options to
deposit amount from the
given account number.
To store the type of
account

BANKING SYSTEM MANAGEMENT

FUNCTION DESIGN

FUNCTION NAME
Create _account();

FUNCTION DESCRIPTION
Function for creating a new account

Show_account();

Function to display the details in an


account
Function to modify the account

Modify();
Dep(int);

Report();

Function to deposit some amount in an


account
Function to withdraw the amount from
an account
Function to show in tabular form

Retacno()

Function to return account number

Retdeposit();

Function to return balance amount

Retype();

Function to return type of the account

Write_account();

Function to write record in binary file

Display_sp(int);
Modify_account();

Function to display account details


given by the user
Function to modify record of file

Delete_account(int);

Function to delete record of file

Display_all();

Function to display all account details

Deposit_withdraw(int,int);

Function to deposit/withdraw amount


for a given account
Introductory screen function

Draw();

Intro();

BANKING SYSTEM MANAGEMENT

SOURCE CODE
#include<iostream.h>
#include<iomanip.h>
#include<conio.h>
#include<stdio.h>
#include<fstream.h>
#include<ctype.h>
class account
{
int acno;
char name[50];
int deposit;
char type;
public:
void create_account();
void show_account();
void modify();
void dep(int);
void draw(int);
void report();
int retacno();
int retdeposit();
char rettype();
};
void account::create_account()
{
cout<<"\n Enter the account number";
cin>>acno;
cout<<"\nEnter the name of the account holder:";
gets(name);
cout<<"\nEnter type of the accoutn(C/S):";
cin>>type;
type=toupper(type);
cout<<"\nEnter the initial amount (>=500 for saving and >=1000 for current):";
cin>>deposit;
cout<<"\n\n\nAccount Created";
}
void account::show_account()
{
10

BANKING SYSTEM MANAGEMENT

cout<<"\nAccount number:"<<acno;
cout<<"\nAccount holder name :"<<name;
cout<<"\nType of account :"<<type;
cout<<"\nBalance amount :"<<deposit;
}
void account::modify()
{
cout<<"\nThe account number"<<acno;
cout<<"\n\nEnter the name of the account holder:";
gets(name);
cout<<"\nEnter type of the account(C/S):";
cin>>type;
type=toupper(type);
cout<<"\nEnter the amount:";
cin>>deposit;
}
void account::dep(int x)
{
deposit+=x;
}
void account::draw(int x)
{
deposit-=x;
}
void account::report()
{
cout<<acno<<setw(10)<<" "<<name<<setw(10)<<"
"<<type<<setw(6)<<deposit<<endl;
}
int account::retacno()
{
return acno;
}
int account::retdeposit()
{
return deposit;
}
char account::rettype()
{
return type;
11

BANKING SYSTEM MANAGEMENT

}
void write_account();
void display_sp(int);
void modify_account(int);
void delete_account(int);
void display_all();
void deposit_withdraw(int,int);
void intro();
int main()
{
char ch;
int num;
clrscr();
intro();
do
{
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t1. NEW ACCOUNT";
cout<<"\n\n\t2. DEPOSIT AMOUNT";
cout<<"\n\n\t3. WITHDRAW AMOUNT";
cout<<"\n\n\t4. BALANCE ENQUIRY";
cout<<"\n\n\t5. ALL ACCOUNT HOLDER LIST";
cout<<"\n\n\t6. CLOSE AN ACCOUNT";
cout<<"\n\n\t7. MODIFY AN ACCOUNT";
cout<<"\n\n\t8. EXIT";
cout<<"\n\n\tSelect Your Option(1-8)";
cin>>ch;
clrscr();
switch(ch)
{
case '1':
write_account();
break;
case '2':
cout<<"\n\n\tEnter the account number :";
cin>>num;
deposit_withdraw(num,1);
break;
12

BANKING SYSTEM MANAGEMENT

case '3':
cout<<"\n\n\tEnter the account number :";
cin>>num;
deposit_withdraw(num,2);
break;
case '4':
cout<<"\n\n\tEnter the account number :";
cin>>num;
display_sp(num);
break;
case '5':
display_all();
break;
case '6':
cout<<"\n\n\tEnter the account number :";
cin>>num;
delete_account(num);
break;
case '7':
cout<<"\n\n\tEnter the account number :";
cin>>num;
modify_account(num);
break;
case '8':
cout<<"\n\n\tThanks for using bank management system :";
break;
default :cout<<"\a";
}
getch();
}
while(ch!='8');
return 0;
}
void write_account()
{
account ac;
ofstream outFile;
outFile.open("account.dat",ios::app);
ac.create_account();
outFile.write((char*)&ac,sizeof(account));
13

BANKING SYSTEM MANAGEMENT

outFile.close();
}
void display_sp(int n)
{
account ac;
int flag=0;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
{
cout<<"File could not be open !!Press any key";
return;
}
cout<<"\n BALANCE DETAILS\n";
while(inFile.read((char*)&ac,sizeof(account)))
{
if(ac.retacno()==n)
{
ac.show_account();
flag=1;
}
}
inFile.close();
if(flag==0)
cout<<"\n\nAccount number does not exist";
}
void modify_account(int n)
{
int found=0;
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.read((char*)&ac,sizeof(account))&&found==0)
{
if(ac.retacno()==n)
14

BANKING SYSTEM MANAGEMENT

{
ac.show_account();
cout<<"\n\nEnter the new details of the account"<<endl;
ac.modify();
int pos=(-1)*sizeof(account);
File.seekp(pos,ios::cur);
File.write((char*)&ac,sizeof(account));
cout<<"\n\n\tRecord Updated";
found=1;
}
}
File.close();
if(found==0)
cout<<"\n\n\t Record 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((char*)&ac,sizeof(account)))
{
if(ac.retacno()!=n)
{
outFile.write((char*)&ac,sizeof(account));
}
}
inFile.close();
outFile.close();
remove("account.dat");
rename("Temp.dat","account.dat");
cout<<"\n\n\tRecord Deleted";
15

BANKING SYSTEM MANAGEMENT

}
void display_all()
{
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\tACCOUNT HOLDER LIST\n\n";
cout<<"====================================\n";
cout<<"A/c no. NAME Type Balance\n";
cout<<"====================================\n";
while(inFile.read((char*)&ac,sizeof(account)))
{
ac.report();
}
inFile.close();
}
void deposit_withdraw(int n,int option)
{
int amt;
int found=0;
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.read((char*)&ac,sizeof(account))&&found==0)
{
if(ac.retacno()==n)
{
// ac.show_account();
if(option==1)
{
16

BANKING SYSTEM MANAGEMENT

cout<<"\n\n\tTO DEPOSIT AMOUNT";


cout<<"\n\n\tEnter the amount to be deposited";
cin>>amt;
ac.dep(amt);
}
if(option==2)
{
cout<<"\n\n\t TO WITHDRAW AMOUNT";
cout<<"\n\n\tEnter the amount to be withdraw";
cin>>amt;
int bal=ac.retdeposit()-amt;
if((bal<500&&ac.rettype()=='S')||(bal<1000&&ac.rettype()=='C'))
cout<<"Insufficient balance";
else
ac.draw(amt);
}
int pos=(-1)*sizeof(ac);
File.seekp(pos,ios::cur);
File.write((char*)&ac,sizeof(account));
cout<<"\n\n\t Record Updated";
found=1; }
else
{
cout<<"notfound";
return;
}
}
File.close();
if(found==0)
cout<<"\n\n\tRecord not found";
}
void intro()
{
cout<<"\n\n\n\t BANK";
cout<<"\n\n\t MANAGEMENT";
cout<<"\n\n\t SYSTEM";
cout<<"\n\n\t MADE BY :Sandra Vijayabhadran";
cout<<"\n\n\t SCHOOL: New Indian Model School";
getch();
}
17

BANKING SYSTEM MANAGEMENT

OUTPUT

18

BANKING SYSTEM MANAGEMENT

19

BANKING SYSTEM MANAGEMENT

20

BANKING SYSTEM MANAGEMENT

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 a 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.

21

You might also like