Vous êtes sur la page 1sur 19

LET US BANK++

A PROJECT ON THE MODERN BANKING SYSTEM


OF
ABC BANK(PROSPERITY GUARANTEED)
CLASS: XII
SECTION:A5
PROGRAM USED : C++
SUBJECT: COMPUTER SCIENCE

Banking:
Problem definition:
This is C++ Projects on Banking Management System, which provides a lot of facility to their
user. This banking record system project in C++ is a simple console application developed
without the use of graphics component.
It is more of a database project in C++, and is built using the languages file handling
mechanism.
The objective and scope of my Project Banking Management System is to record the details
various activities of user. It will simplifies the task and reduse the paper work.
The system is very user friendly and it is anticipated that functions of the system will be easily
accessed by users

PROGRAM ANALYSIS

File handling has been effectively used for each feature of this project. Here, I am going to
describe these features in brief.

AddRecord:
For this feature function has been used to add banking record into the file. It asks for
information such as account number, first name, last name and balance to be entered.
It asks whether we are an existing user. The system acts accordingly to the reply.

Show/ListData:
With the information provided in add record, the function in this banking record
system project in C++ show the record corresponding to a particular account number,
first name and last name. Current balance of the account holder is displayed.

SearchRecord:
When the function for this feature is first executed, it shows the total records in the file,
and the user can then search by record number. If the record searched for is not found, the
banking record system project in C++ displays the message Error in opening! File
Not Found!! Then it displays the total information of the account holder

EditRecord:
This works in similar manner to the Search feature. When the function for Edit Record is
first executed, it shows the total records in the file, and the user can edit the information
by providing record number. Then, the C++ project shows all the data in that record, and
the user can enter any data to modify. If the record to be edited for is not found, it
displays the message Error in opening! File Not Found!!. Pin number can also be
changed

DeleteRecord:
First of all, when the function of this feature is executed, it shows all the records i the file,
and the user can enter the record number to delete. If the record was not found, this
banking record system project in C++ displays the message Error in opening! File
Not Found!!. On closing the account you get the message to collect the money in the
nearest bank

Hence, there is a need of reformation of the system with more advantages and flexibility. The
Banking Management System eliminates most of the limitations of the existing software. It has
the following objectives:
1. To Save Time
2. To Achive Accuracy
3. To Save Space(which is wasted in traditional manul/file based system).
4. Easy Retrival/Modification
5.To Enhance Transparency
6. To minimize frauds
7. Many Drawback of Current System
8. Redundancy
9.Reduce the cost of maintenance.
PROJECT CATEGORY: Relational Database Management System (RDBMS)

The project is entitled Banking Management System,category RDBMS. SYSTEM ,


thorough grasping of the user functionality and applying, approving the same in the project,
Developing, Testing & Debugging of Forms, User Training and Implementation of the module
HARDWARE AND SOFTWARE REQUIREMENTS
Operating system: Windows 2000/XP/Vista/7/8
Borland C++,Turbo C++, Codeblocks(with compiler mingw)etc.
RAM:128 MB
CPU: Pentium 4 or more
HARD DISK: 40 GB SATA OR MORE
NOTE:
Windows 7/8.1/8.2 uses Turbo C++ DOS BOX and some use TURBO c 7 BY AKKI.
FLOWCHART

FUTURE ENHANCEMENTS:
The banking system can be interlinked to various systems through a server and internet banking
can be done.

Graphics can be incorporated inorder to make the system look very attractive.
Many ATMs can be interlinked through the same.
Mobile banking can also be done.
Apps can be designed to make the android users happy.
Further security checks like capcha code,finger print identification mark etc. Can be used to
make the system more efficient.

SOURCE CODE:
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<fstream.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
class acbank
{
char name[50];
int pass;
char mno[10];
char type;
float bal;
char branch[20];
public:
void input();
float retbal()
{
return bal;
}
float deposit1(int g)
{
bal+=g;
return bal;
}
float modifybal(int amt)
{
bal+=amt;
return bal;
}
void generate()
{
randomize();
pass=random(8000)+1000;
}
void display()
{
cout<<"\nName :"<<name;
cout<<"\nMobile Number: "<<mno;
cout<<"\nBalance :"<<bal;
cout<<"\nBranch:"<<branch;
}
int retpass()
{
return pass;
}
char*retname()
{

return name;
}
void changeb(char* n)
{
strcpy(branch,n);
}
void changmobile(char* m)
{
strcpy(mno,m);
}
}s;
void acbank::input()
{
int m,n;
label :
cout<<"\nEnter your name :";
gets(name);
n=strlen(name);
int i=0;
do
{
if(!isalpha(name[i]))
{
cout<<"No Special Characters allowed in the Name !!\n ";
cout<<"Try again.. \n";
goto label;
}
i++;
}while(i<n);
l:
cout<<"Enter the type of account (s/c): ";
cin>>type;
if((type=='s')||(type=='c'));
else
{
cout<<"\nInvalid choice (try again)!!\n";
goto l;
}
h:
cout<<"\nEnter your mobile number : ";
gets(mno);
m=strlen(mno);
if(m!=10)
{
cout<<"Mobile number should be10 digits long \n";
cout<<"Try again ..\n";
goto h;
}
else
{
for(int i=0;i<m;i++)
{
if(!isdigit(mno[i]))
{

cout<<"\nOnly numbers allowed!!try again\n";


goto h;
}
}
}
o:
int ch;
cout<<"\nEnter the choice of branch you want to open account :";
cout<<"\n1.Chennai\n2.Delhi\n3.Mumbai\n4.Kolkata";
cout<<"\nEnter your choice";
cin>>ch;
switch(ch)
{
case 1:strcpy(branch,"Chennai");
break;
case 2:strcpy(branch,"Delhi");
break;
case 3:strcpy(branch,"Mumbai");
break;
case 4:strcpy(branch,"Kolkata");
break;
default:cout<<"\nInvaild choice....try again!!";
goto o;
}
x:
cout<<"Enter the amount you want to deposit : ";
cin>>bal;
if(bal<1000)
{
cout<<"\nMinimum balance required is Rs.1000. Please deposit
atleast Rs.1000. \n";
goto x;
}
}
void creacc()
{
fstream b("bank.dat",ios::app|ios::binary);
if(!b)
cout<<"n\Error";
else
{
s.input();
s.generate();
b.write((char*)&s,sizeof(s));
cout<<"\nYour password is:"<<s.retpass();
cout<<"\nKeep it Confidential";
}
b.close();
}
void deposit(int pass)
{
int amt,g,bal;
cout<<"\nEnter the amount you want to deposit : ";
cin>>amt;

fstream a("bank.dat",ios::binary|ios::in|ios::out);
if(!a)
cout<<"\nError";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
int k=s.retpass();
if(a.eof())
{cout<<"\nRecords not found ";
break;}
else if(k==pass)
{
cout<<"\nPrevious balance is "<<s.retbal();
s.modifybal(amt);
cout<<"\nNew balance after deposit is "<<s.retbal();
a.seekp(a.tellp()-sizeof(s),ios::beg);
a.write((char*)&s,sizeof(s));
cout<<"\nrecords updated";
break;
}
}
}
}
void withdraw(int pass)
{
int amt,g,bal;
cout<<"\nEnter the amount you want to withdraw : ";
cin>>amt;
fstream a("bank.dat",ios::binary|ios::in|ios::out);
if(!a)
cout<<"\nError";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
int k=s.retpass();
if(a.eof())
{cout<<"\nRecords not found ";
break;}
else if(k==pass)
{
if(amt>=s.retbal())
{
cout<<"\nexceeding maximum limit";
cout<<"\ntry again";
break;
}
cout<<"\nPrevious balance is "<<s.retbal();
s.modifybal(-1*amt);
cout<<"\nNew balance after withdrawl is "<<s.retbal();
a.seekp(a.tellp()-sizeof(s),ios::beg);

a.write((char*)&s,sizeof(s));
cout<<"\nrecords updated";
break;
}
}
}
}
void closeacc(int pass)
{
ifstream a("bank.dat",ios::binary);
ofstream b("ABC.DAT",ios::binary);
if(!a||!b)
cout<<"Error";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
if(a.eof())
break;
if(s.retpass()!=pass)
b.write((char*)&s,sizeof(s));
if(s.retpass()==pass)
{
cout<<"\nACCOUNT CLOSED!!!!@@@@\ncollect your balance amount
from your nearest branch";
cout<<"\nTHANKING FOR BANKING WITH US ";
cout<<"\nHere are the details of you we have with us:";
s.display();
}
}
}
a.close();
b.close();
remove("bank.dat");
rename("ABC.dat","bank.dat");
}
void modifyacc(int pass)
{
char mobno[20];
int ch,m;
fstream a("bank.dat",ios::binary|ios::in|ios::out);
if(!a)
cout<<"\nError";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
int k=s.retpass();
if(a.eof())
{
cout<<"\nRecords not found ";
break;

}
else if(k==pass)
{
int c;
clrscr();
cout<<"\nUPDATE list\n1.PHONE NO\n2.BRANCH\nEnter your choice:";
cin >>c;
switch(c)
{
case 1:h:
cout<<"\nEnter your mobile number : ";
gets(mobno);
m=strlen(mobno);
if(m!=10)
{
cout<<"Mobile number should be10 digits long \n";
cout<<"Try again ..\n";
goto h;
}
else
{
for(int i=0;i<m;i++)
{
if(!isdigit(mobno[i]))
{
cout<<"\nOnly numbers allowed!!try again\n";
goto h;
}
}
}
s.changmobile(mobno);
cout<<"\nRecords updated";
break;
case 2:o:cout<<"\nEnter the choice of branch :";
cout<<"\n1.Chennai\n2.Delhi\n3.Mumbai\n4.Kolkata";
cout<<"\nEnter your choice";
cin>>ch;
switch(ch)
{
case 1:s.changeb("Chennai");
break;
case 2:s.changeb("Delhi");
break;
case 3:s.changeb("Mumbai");
break;
case 4:s.changeb("Kolkata");
break;
default:cout<<"\nInvaild choice....try again!!";
goto o;
}
cout<<"\nrecords update!!";
break;
default:cout<<"Wrong choice try again";
}

a.seekp(a.tellp()-sizeof(s),ios::beg);
a.write((char*)&s,sizeof(s));
break;
}
a.close();
}
}
}
void viewacc(int pass)
{
ifstream a("bank.dat",ios::binary);
if(!a)
cout<<"Error";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
if(a.eof())
break;
if(pass==s.retpass())
{
cout<<"\nYour details are as follows:";
s.display();
break;
}
}
}
a.close();
}
void changepin(int pass)
{int p;
fstream a("bank.dat",ios::binary|ios::in|ios::out);
if(!a)
cout<<"Error";
else
{
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
if(a.eof())
break;
if(pass==s.retpass())
{
cout<<"\nRe-enter your password again:";
cin>>p;
if(p==pass)
{
s.generate();
cout<<"YOUR NEW PASSWORD IS:"<<s.retpass();
a.seekp(a.tellp()-sizeof(s),ios::beg);
a.write((char*)&s,sizeof(s));
break;
}

else
{
cout<<"ACCESS DENIED!!!";
break;
}
}
}
a.close();
}
}
void main()
{
clrscr();
char c,rep,name[20];
int ch,i=0,pass;
cout<<"WELCOME TO ABC BANK";
cout<<"\nAre you an existing user (y or n) :" ;
cin>>c;
if(c=='n'||c=='N')
{
cout<<"\nThanks for choosing us";
creacc();
cout<<"\nYour account is created successfully !!! ";
}
else
{
ifstream a("bank.dat",ios::binary|ios::in);
if(!a)
cout<<"Error";
cout<<"Enter your 4 digit pin :";
cin>>pass;
while(!a.eof())
{
a.read((char*)&s,sizeof(s));
int k=s.retpass();
cout<<k;
if(a.eof())
break;
if(k==pass)
{
i++;
strcpy(name,s.retname());
break;
}
}
if(i==0)
cout<<"Try again";
a.close();
}
if(i!=0)
{
do
{
clrscr();

cout<<"HI!! " ;puts(name);


cout<<"\n\n\t\t\tMAIN MENU";
cout<<"\n\n\n01.DEPOSIT AMOUNT";
cout<<"\t\t\t\t02.Withdraw amount";
cout<<"\n\n\n03.Close account ";
cout<<"\t\t\t\t04.Modify account details ";
cout<<"\n\n\n05.View account ";
cout<<"\t\t\t\t06.Change pin";
cout<<"\n\n\nEnter your choice ";
cin>>ch;
clrscr();
switch(ch)
{
case 1:deposit(pass);
break;
case 2:withdraw(pass);
break;
case 3:closeacc(pass);
break;
case 4:modifyacc(pass);
break;
case 5:viewacc(pass);
break;
case 6:changepin(pass);
break;
default:cout<<"INVALID CHOICE";
}
if(ch==3||ch==6)
break;
cout<<"\n\nDo you want continue banking?";
cin>>rep;
}while(rep=='y'||rep=='Y');
}
getch();
}

SCREEN SHOTS:

Vous aimerez peut-être aussi