Anda di halaman 1dari 33

COMPUTER SCIENCE

INVESTIGATORY
PROJECT

Neha singh
XII- C
BANKING SYSTEMS

Page 1

BANKING SYSTEMS

Page 2

KENDRIYA VIDYALAYA
ASC CENTRE (SOUTH),
BANGALORE

CERTIFICATE

This is to certify that Master Neha Singh of class XII-C


Of Kendriya Vidyalaya, ASC centre (south), Bangalore has
Successfully completed his Computer Science Investigatory Project
Work as prescribed by CBSE
Under AISSCE.

Signature of the Internal Examiner:


Date:

Signature of the External Examiner:


Date:

BANKING SYSTEMS

Page 3

Through this acknowledgement, we express


Our sincere gratitude to all those who have helped us with this project and
made it a Worthwhile Experience.

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

Bank is a financial institution that serves as a financial


intermediary. The term "bank" may refer to one of several
related types of entities:
A central bank circulates money on behalf of a government and
acts as its monetary authority by implementing monetary policy,
which regulates the money supply.
A commercial bank accepts deposits and pools those funds to
provide credit, either directly by lending, or indirectly by
investing through the capital markets. Within the global financial
markets, these institutions connect market participants with
capital deficits (borrowers) to market participants with capital
surpluses (investors and lenders) by transferring funds from
those parties who have surplus funds to invest (financial assets)
to those parties who borrow funds to invest in real assets.
A savings bank is similar to a savings and loan association (S&L).
They can either be stockholder owned or mutually owned, in which
case they are permitted to only borrow from members of the
financial cooperative. The asset structure of savings banks and
savings and loan associations is similar, with residential mortgage
loans providing the principal assets of the institution's portfolio.
Because of the important role depository institutions play in the
financial system, the banking industry is generally regulated with
government restrictions on financial activities by banks varied
BANKING SYSTEMS

Page 6

over time and by location. Current global bank capital


requirements are referred to as Basel II.
A Bank's main source of income is interest paid on loans. A bank
pays out at a lower interest rate on deposits and receives a
higher interest rate on loans. The difference between these
rates represents the bank's net income.[2] Banks also generate
non-interest income from service fees for Retail and Business
banking products, transactional fees, or other non-traditional
services such as Trust and Wealth Management consulting,
Insurance, Cash Management services, Mortgage loan closing
costs and points.

BANKING SYSTEMS

Page 7

Banking systems is used to maintain various accounts for serving the


customers. The customers could transact in savings account or current
account. Each account has its own facilities. For example, the savings
account will provide deposit, annual interest and withdrawal facilities.
However, it may not provide chequebook facility. The current account, on
the hand, will provide chequebook facility but no interest on the deposit.
For the two types of account, we design a single common class called

account that has possible properties, which can be inherited by them.

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++

CODE OF THE PROGRAM


BANKING SYSTEMS

Page 10

//this program is based on banking.


#include<fstream.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<process.h>
#include<math.h>
struct address
{
char d_no[5];
char street[20];
char place[20];
char city[20];
char state[20];
};
struct dob
{
int dat;
int month;
int year;
};
class account
{
public:
char name[20];
char sex;
int age;
int accn;
char acctype;
dob date;
address addr;
void getval()
{
cout<<"\n\n Enter name:";
gets(name);
cout<<"\n\n Enter sex(f/m):";
cin>>sex;
cout<<"\n\n Enter age:";
cin>>age;
cout<<"\n\n Enter date of birth(dd/mm/yyyy):";
cin>>date.dat>>date.month>>date.year;
cout<<"\n\n Enter address:";
cout<<"\n\n Enter door number:";
cin>>addr.d_no;
BANKING SYSTEMS

Page 11

cout<<"\n\n Enter street name:";


gets(addr.street);
cout<<"\n\n Enter place name:";
gets(addr.place);
cout<<"\n\n Enter city name:";
gets(addr.city);
cout<<"\n\n Enter state name:";
gets(addr.state);
cout<<"\n\n Enter account number:";
cin>>accn;
cout<<"\n\n Enter account type-'c'current,'s'saving:";
cin>>acctype;
}
void display()
{
cout<<"\n\n Name:";
puts(name);
cout<<"\n\n Sex:"<<sex;
cout<<"\n\n Age:"<<age;
cout<<"\n\n Date of birth:"<<date.dat<<'\t'<<date.month<<'\t'<<date.year;
cout<<"\n\n Address:";
cout<<"\n\n Door number:"<<addr.d_no;
cout<<"\n\n Street:";
puts(addr.street);
cout<<"\n\n Place:";
puts(addr.place);
cout<<"\n\n City:";
puts(addr.city);
cout<<"\n\n State:";
puts(addr.state);
cout<<"\n\n Account number:"<<accn;
cout<<"\n\n Account type:"<<acctype;
}
char*retname()
{
return name;
}
int retaccount()
{
return accn;
}
};
class cur_acc:public account
{
BANKING SYSTEMS

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

cout<<"\n\n YOU CANNOT WITHDRAW";


exit(0);
}
balance=balance-y;
return(balance);
}
float interest()
{
int tm=1;
float r=3.5;
balance=balance*(pow(1+r/100,tm));
return(balance);
}
void modify()
{
char ch;
cout<<"\n Name:"<<name;
cout<<"\n want to modify name(y/n):";
cin>>ch;
if(ch=='y')
{
cout<<"\n Enter new name:";
gets(name);
}
cout<<"\n Age:"<<age;
cout<<"\n want to modify age:";
cin>>ch;
if(ch=='y')
{
cout<<"\n Enter new age:";
cin>>age;
}
cout<<"\n Date of birth:"<<date.dat<<date.month<<date.year;
cout<<"\n want to modify date of birth:";
cin>>ch;
if(ch=='y')
{
cout<<"\n enter new date of birth(dd/mm/yyyy):";
cin>>date.dat>>date.month>>date.year;
}
}
void seebalance()
{
display();
BANKING SYSTEMS

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

cout<<"\n\n1. Search by name.";


cout<<"\n\n2. Search by account number.";
cout<<"\n\n Enter your choice:";
cin>>ch;
if(ch==1)
{
cout<<"\n\n1. Current account.";
cout<<"\n\n2. Saving account.";
cout<<"\n\n Enter Your choice:";
cin>>c;
if(c==1)
{
cur_acc cac;
int f=0;
cout<<"\n\n Enter name to search:";
gets(search_name);
ifstream fin;
fin.open("c:\\vikas.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(strcmp(cac.retname(),search_name)==0)
{
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 name to search:";
gets(search_name);
ifstream fin;
fin.open("c:\\akash.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(strcmp(sac.retname(),search_name)==0)
BANKING SYSTEMS

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

cout<<"\n\n1. Delete current account record.";


cout<<"\n\n2. Delete saving account details.";
cout<<"\n\n Enter your choice:";
cin>>ch;
if(ch==1)
{
cur_acc cac;
ifstream fin;
ofstream fout;
cout<<"\n\n Enter account number to be deleted:";
cin>>del_accn;
fin.open("c:\\vikas.txt",ios::in|ios::binary);
fin.seekg(0);
fout.open("newc:\\vikas.txt",ios::out|ios::binary|ios::app);
while(fin.read((char*)&cac,sizeof(cac)))
{
if(cac.retaccount()!=del_accn)
{
fout.write((char*)&cac,sizeof(cac));
}
}
fout.close();
fin.close();
remove("c:\\vikas.txt");
rename("newc:\\vikas.txt","c:\\vikas.txt");
} //end of ch=1.
if(ch==2)
{
sav_acc sac;
ifstream fin;
ofstream fout;
cout<<"\n\n Enter account number to be deleted:";
cin>>del_accn;
fin.open("c:\\akash.txt",ios::in|ios::binary);
fin.seekg(0);
fout.open("newc:\\akash.txt",ios::out|ios::binary|ios::app);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(sac.retaccount()!=del_accn)
{
fout.write((char*)&sac,sizeof(sac));
}
}
BANKING SYSTEMS

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

cac.seebalance(); //since bank provides no interest on current account.


}
}
fin.close();
}
else
{
ifstream fin;
fin.open("c:\\akash.txt",ios::in|ios::binary);
fin.seekg(0);
while(fin.read((char*)&sac,sizeof(sac)))
{
if(accn==sac.retaccount())
{
sac.seebalance();
cout<<"\n\n New balance:"<<sac.interest();
}
}
fin.close();
}
break;
case 5:modifyrec();
break;
case 6:search();
break;
case 7:deleterec();
break;
case 8:exit(0);
default:cout<<"\n\n WRONG NUMBER ENTERED";
goto menu;
}
cout<<"\n\n Do want to continue the program(y/n):";
cin>>ch;
}
while(ch=='y'||ch=='Y');
cout<<"\n\n THANK YOU FOR USING THIS PROGRAM";
getch();
}

BANKING SYSTEMS

Page 25

Screen shots

BANKING SYSTEMS

Page 26

BANKING SYSTEMS

Page 27

BANKING SYSTEMS

Page 28

Following enhancement may be carried out in future to


improve the reliability and performance of THE BANKING
SYSTEMS:
a) Introduction of mouse click events
b)Introduction of printable reports
c) Use of username and password for authentication

BANKING SYSTEMS

Page 29

d)Another derived class fixed deposit account


which provides the customers to deposit their
money in short or long terms. For these deposits
bank pays the fixed interest.

Through hierarchical inheritance and object oriented


programming our program has achieved success in
storing, manipulating and modifying the details of a
number of customers of a particular bank depending
BANKING SYSTEMS

Page 30

upon their access types-current account access type


or saving account access type.

CBSE Computer Science Text Book for XI & XII


by Sumita Arora.
Turbo C++ Help Index.
Object Oriented Programming by P.B Kottur.

BANKING SYSTEMS

Page 31

TESTING AND VALIDATION


>BLACK BOX TEST: Black Box Testing is a testing technique where
no knowledge of the internal functionality and structure of the
system are available. This testing technique treats the system as a
black box or closed box. The tester only knows the formal inputs
and expected outputs, but does not know how the program actually
arrives at those outputs. As a result, all testing must be based on
functional specifications. For this reason black box testing is also
considered to be functional testing and is also a form of behavioral
testing or opaque box testing or simply closed box testing.
Although black box testing is behavioral testing, behavioral test
design is slightly different from black box test design because
internal knowledge may be available in behavioral testing.
BANKING SYSTEMS

Page 32

>DRY RUN TEST: A dry run test is a method of testing in a c++


program. In this method we simply run the program using some
experimental values and we check whether the program is running
fine and if there are any errors, we must correct it.

>VALIDATION: Validation is the method of taking precautions


while coding a program. It is to avoid the crashing of program is a
incorrect/invalid value is entered.

BANKING SYSTEMS

Page 33

Anda mungkin juga menyukai