INVESTIGATORY
PROJECT
Neha singh
XII- C
BANKING SYSTEMS
Page 1
BANKING SYSTEMS
Page 2
KENDRIYA VIDYALAYA
ASC CENTRE (SOUTH),
BANGALORE
CERTIFICATE
BANKING SYSTEMS
Page 3
Firstly I extend our thanks to the various people who have shared their
opinion and experience through which we received the required information
crucial for our projects.
Finally, I express our thanks to Mrs. Pooja Khare who gave us this
opportunity to learn the subject in a practical approach and who guided us
and gave us valuable suggestions regarding the project.
BANKING SYSTEMS
Page 4
Index
1.
What is a Bank?
2.
Banking System
3.
Brief Description
4.
Software and Hardware
Requirement Specification.
5.
Program Code
6.
Sample Screen Shots
7.
Future Scope
8.
Testing and validation
9.
Conclusion
10. Bibliography
BANKING SYSTEMS
Page 5
Page 6
BANKING SYSTEMS
Page 7
ACCOUNT
SAVINGS
BANKING SYSTEMS
CURRENT
HIERARCHICAL INHERITANCE
Page 8
BANKING SYSTEMS
Page 9
Hardware Requirement
The system would require following hardware during the Bank System:
(a)A computer at least with 10 MB hard disk space.
(b)A computer with at least 50 RAM dedicated with for software.
Software Requirement
The software required, are as follows:
(a) Windows XP Professional/Vista/Windows 7 containing MS DOS.
The software required for development software, are as follows:
(a)Turbo C++
Page 10
Page 11
Page 12
public:
float balance;
void getdata()
{
getval();
cout<<"\n\n Enter initial balance:";
cin>>balance;
}
float deposit()
{
float y;
cout<<"\n\n Enter the deposit amount:";
cin>>y;
balance=balance+y;
return(balance);
}
float withdraw()
{
float y;
cout<<"\n\n Enter the withdrawl amount:";
cin>>y;
if(balance<0)
{
cout<<"\n\n YOU CANNOT WITHDRAW";
exit(0);
}
balance=balance-y;
return(balance);
}
void modify()
{
char ch;
cout<<"\n\n Name:"<<name;
cout<<"\n\n want to modify name(y/n):";
cin>>ch;
if(ch=='y')
{
cout<<"\n\n enter new name:";
gets(name);
}
cout<<"\n\n Age:"<<age;
cout<<"\n\n want to modify age(y/n);";
cin>>ch;
if(ch=='y')
BANKING SYSTEMS
Page 13
{
cout<<"\n\n Enter new age:";
cin>>age;
}
cout<<"\n\n Date of birth:"<<date.dat<<'\t'<<date.month<<'\t'<<date.year;
cout<<"\n\n want to modify date of birth(y/n):";
cin>>ch;
if(ch=='y')
{
cout<<"\n\n Enter new date of birth(dd/mm/yyyy):";
cin>>date.dat>>date.month>>date.year;
}
} //end of modify.
void seebalance()
{
display();
cout<<"\n\n Balance:"<<balance;
}
}; //end of class cur_acc.
class sav_acc:public account
{
public:
float balance;
void getdata()
{
getval();
cout<<"\n\n Enter initial balance:";
cin>>balance;
}
float deposit()
{
float y;
cout<<"\n\n enter deposit amount:";
cin>>y;
balance=balance+y;
return(balance);
}
float withdraw()
{
float y;
cout<<"\n\n Enter the withdrawl amount:";
cin>>y;
if(balance<1000)
{
BANKING SYSTEMS
Page 14
Page 15
cout<<"\n Balance:"<<balance;
}
};
void write()
{
char acct;
cout<<"\n Enter access type(c/s):";
cin>>acct;
if(acct=='c')
{
cur_acc cac;
ofstream fout;
fout.open("c:\\vikas.txt",ios::out|ios::binary|ios::app);
char ch='y';
while(ch=='y')
{
cac.getdata();
fout.write((char*)&cac,sizeof(cac));
cout<<"\n\n Want to enter more(y/n):";
cin>>ch;
}
fout.close();
}
if(acct=='s')
{
sav_acc sac;
ofstream fout;
fout.open("c:\\akash.txt",ios::out|ios::binary|ios::app);
char ch='y';
while(ch=='y')
{
sac.getdata();
fout.write((char*)&sac,sizeof(sac));
cout<<"\n\n want to enter more(y/n):";
cin>>ch;
}
fout.close();
}
} //end of write function.
void search()
{
int ch,c;
char search_name[15];
int search_accn;
BANKING SYSTEMS
Page 16
Page 17
{
f=1;
sac.seebalance();
break;
}
}
if(!f)
cout<<"\n\n RECORD NOT FOUND.";
fin.close();
} //end of c=2.
} //end of ch=1.
if(ch==2)
{
cout<<"\n\n Current account.";
cout<<"\n\n Saving account.";
cout<<"\n\n Enter your choice:";
cin>>c;
if(c==1)
{
cur_acc cac;
int f=0;
cout<<"\n\n Enter account number to search:";
cin>>search_accn;
ifstream fin;
fin.open("c:\\vikas.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(cac.retaccount()==search_accn)
{
f=1;
cac.seebalance();
break;
}
}
if(!f)
cout<<"\n\n RECORD NOT FOUND.";
fin.close();
} //end of c=1.
if(c==2)
{
sav_acc sac;
int f=0;
cout<<"\n\n Enter account number to search:";
BANKING SYSTEMS
Page 18
cin>>search_accn;
ifstream fin;
fin.open("c:\\akash.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(sac.retaccount()==search_accn)
{
f=1;
sac.seebalance();
break;
}
}
if(!f)
cout<<"\n\n RECORD NOT FOUND.";
fin.close();
} //end of c=2.
} //end of ch=2.
} //end of search function.
void modifyrec()
{
int modify_accn;
int ch,f=0;
cout<<"\n\n 1.Modify current account record.";
cout<<"\n\n 2.Modify saving account record.";
cout<<"\n\n Enter your choice:";
cin>>ch;
if(ch==1)
{
cur_acc cac;
ifstream fin;
ofstream fout;
long p;
cout<<"\n\n Enter account number to be modified:";
cin>>modify_accn;
fin.open("c:\\vikas.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(cac.retaccount()==modify_accn)
{
f=1;
cac.modify();
p=fin.tellg();
BANKING SYSTEMS
Page 19
fout.open("c:\\vikas.txt",ios::out|ios::binary);
fout.seekp(p-sizeof(cac),ios::beg);
fout.write((char*)&cac,sizeof(cac));
break;
}
}
if(!f)
cout<<"\n\n RECORD TO BE MODIFIED NOT FOUND.";
fin.close();
fout.close(); //end of ch=1.
}
if(ch==2)
{
sav_acc sac;
ifstream fin;
ofstream fout;
long p;
cout<<"\n\n Enter account number to be modified:";
cin>>modify_accn;
fin.open("c:\\akash.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(sac.retaccount()==modify_accn)
{
f=1;
sac.modify();
p=fin.tellg();
fout.open("c:\\akash.txt",ios::out|ios::binary);
fout.seekp(p-sizeof(sac),ios::beg);
fout.write((char*)&sac,sizeof(sac));
break;
}
}
if(!f)
cout<<"\n\n RECORD TO BE MODIFIED NOT FOUND.";
fin.close();
fout.close(); //end of ch=2.
}
} //end of modify function.
void deleterec()
{
int del_accn;
int ch;
BANKING SYSTEMS
Page 20
Page 21
fout.close();
fin.close();
remove("c:\\akash.txt");
rename("newc:\\akash.txt","c:\\akash.txt");
} //end of ch=2.
} //end of delete function
void main()
{
clrscr();
cur_acc cac;
sav_acc sac;
int choice,accn;
char ch,acctype;
do
{
menu:
clrscr();
cout<<"\n\n\t\t*************BANKING SYSTEM*************"<<endl;
cout<<"\n\n\t\t 1. ENTER CUSTUMER INFORMATION.";
cout<<"\n\n\t\t 2. DEPOSIT.";
cout<<"\n\n\t\t 3. WITHDRAW.";
cout<<"\n\n\t\t 4. INTEREST.";
cout<<"\n\n\t\t 5. MODIFY RECORD.";
cout<<"\n\n\t\t 6. SEARCH FOR RECORD.";
cout<<"\n\n\t\t 7. DELETE RECORD.";
cout<<"\n\n\t\t 8. EXIT.";
cout<<"\n\n\t\t Enter your choice:";
cin>>choice;
switch(choice)
{
case 1:write();
break;
case 2:cout<<"\n\n Enter access type(c/s):";
cin>>acctype;
cout<<"\n\n Enter account number:";
cin>>accn;
if(acctype=='c')
{
fstream fin;
fin.open("c:\\vikas.txt",ios::in|ios::binary|ios::out);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
BANKING SYSTEMS
Page 22
if(accn==cac.retaccount())
{
cac.seebalance();
cout<<"\n\n New balance:"<<cac.deposit();
long pos=fin.tellg();
pos=pos-sizeof(cac);
fin.seekp(pos);
fin.write((char*)&cac,sizeof(cac));
}
}
fin.close();
}
else
{
fstream fin;
fin.open("c:\\akash.txt",ios::in|ios::binary|ios::out);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(accn==sac.retaccount())
{
sac.seebalance();
cout<<"\n\n New balance:"<<sac.deposit();
long pos=fin.tellg();
pos=pos-sizeof(sac);
fin.seekp(pos);
fin.write((char*)&sac,sizeof(sac));
}
}
fin.close();
}
break;
case 3:cout<<"\n\n Enter access type(c/s):";
cin>>acctype;
cout<<"\n\n Enter account number:";
cin>>accn;
if(acctype=='c')
{
fstream fin;
fin.open("c:\\vikas.txt",ios::in|ios::binary|ios::out);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(accn==cac.retaccount())
BANKING SYSTEMS
Page 23
{
cac.seebalance();
cout<<"\n\n New balance:"<<cac.withdraw();
long pos=fin.tellg();
pos=pos-sizeof(cac);
fin.seekp(pos);
fin.write((char*)&cac,sizeof(cac));
}
}
fin.close();
}
else
{
fstream fin;
fin.open("c:\\akash.txt",ios::in|ios::binary|ios::out);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(accn==sac.retaccount())
{
sac.seebalance();
cout<<"\n\n New balance:"<<sac.withdraw();
long pos=fin.tellg();
pos=pos-sizeof(sac);
fin.seekp(pos);
fin.write((char*)&sac,sizeof(sac));
}
}
fin.close();
}
break;
case 4:cout<<"\n\n Enter access type(c/s):";
cin>>acctype;
cout<<"\n\n Enter the account number:";
cin>>accn;
if(acctype=='c')
{
ifstream fin;
fin.open("c:\\vikas.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(accn==cac.retaccount())
{
BANKING SYSTEMS
Page 24
BANKING SYSTEMS
Page 25
Screen shots
BANKING SYSTEMS
Page 26
BANKING SYSTEMS
Page 27
BANKING SYSTEMS
Page 28
BANKING SYSTEMS
Page 29
Page 30
BANKING SYSTEMS
Page 31
Page 32
BANKING SYSTEMS
Page 33