Comp. Project Full&Final
Comp. Project Full&Final
Pritam Das
Class - XII A
{AS PER CBSE GUIDELINES}
(PGT-CSE)
Acknowledgement
We would like to thank Mr. Rohit Chaudhry (Computer Science Lecturer),
for his able guidance and the support exhibited by him in the completion
of the project.
Thanking you
Pritam Das
Principle signature
2
CERTIFICATE
This is to certify that Pritam Das of class XII ‘A’ have
successfully completed their Computer Project on ‘Banking Management’
under the able guidance of Mr. Rohit Chaudhry
3
Declaration
I hereby declare that the project work entitled “Banking management”,
submitted to Department of Computer science, Homerton Grammar School, is
prepared by me. All the coding are result of my personal effort.
Pritam Das
Class XII A
4
Index
Acknowledgement……………………………..2
Certificate……………………………………..3
Declaration…………………………………….4
Header file……………………………………..6
Banking………………………………………...7
Coding…………………………………………8
Output screen………………………………….21
Bibliography…………………………………...27
5
Header files
#include<fstream.h>
#include<ctype.h>
#include<iomanip.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
6
Banking
Banks act as payment agents by conducting checking or current accounts for customers,
paying check drawn by customers on the bank, and collecting checks deposited to customers' current
accounts. Banks also enable customer payments via other payment methods such as Automated Clearing
House (ACH), Wire transfers or telegraphic transfer, EFTPOS, and automated teller machine (ATM).
Banks borrow money by accepting funds deposited on current accounts, by accepting term deposits, and
by issuing debt securities such as banknotes and bonds. Banks lend money by making advances to
customers on current accounts, by making installment loans, and by investing in marketable debt
securities and other forms of money lending.
Banks provide almost all payment services, and a bank account is considered indispensable by most
businesses, individuals and governments. Non-banks that provide payment services such as remittance
companies are not normally considered an adequate substitute for having a bank account.
Banks borrow most funds from households and non-financial businesses, and lend most funds to
households and non-financial businesses, but non-bank lenders provide a significant and in many cases
adequate substitute for bank loans, and money market funds, cash management trusts and other non-bank
financial institutions in many cases provide an adequate substitute to banks for lending savings too.
Therefore, this program is a simple example of commercial programs used by Banks and their
Managements.
7
Program Source Code *
/*
* ----------------------------------------------------------------------------
File:banking.CPP
* ----------------------------------------------------------------------------
*/
//***************************************************************
//****************************************************************
#include<fstream.h>
#include<ctype.h>
#include<iomanip.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
//***************************************************************
//****************************************************************
class account
int acno;
char name[50];
int deposit;
char type;
public:
8
void create_account(); //function to get data from user
void draw(int); //function to accept amount and subtract from balance amount
account()
acno=deposit=0;
void account::create_account()
cin>>acno;
gets(name);
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()
9
cout<<name;
void account::modify()
gets(name);
cin>>type;
type=toupper(type);
cin>>deposit;
void account::dep(int x)
deposit+=x;
void account::draw(int x)
deposit-=x;
void account::report()
10
int account::retacno()
return acno;
int account::retdeposit()
return deposit;
char account::rettype()
return type;
//***************************************************************
// function declaration
//****************************************************************
void invalid();
//***************************************************************
//****************************************************************
11
int main()
char ch;
int num;
clrscr();
intro();
do
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t08. EXIT";
cin>>ch;
clrscr();
if(ch<64||ch>123)
switch(ch)
case '1':
write_account();
break;
case '2':
deposit_withdraw(num, 1);
break;
12
case '3':
deposit_withdraw(num, 2);
break;
case '4':
display_sp(num);
break;
case '5':
display_all();
break;
case '6':
delete_account(num);
break;
case '7':
modify_account(num);
break;
case '8':
break;
default :cout<<"\a";
invalid();
break;
else
cout<<"Inspite of WARNING you entered alphabets.... \n\n Program will Exit now.. ";
getch();
exit(0);
13
}
getch();
}while(ch!='8');
return 0;
//***************************************************************
//****************************************************************
void write_account()
account ac;
ofstream outFile;
outFile.open("account.dat",ios::binary|ios::app);
ac.create_account();
outFile.close();
//***************************************************************
//****************************************************************
void display_sp(int n)
account ac;
int flag=0;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
14
cout<<"File could not be open !! Press any Key...";
return;
cout<<"\nBALANCE DETAILS\n";
if(ac.retacno()==n)
ac.show_account();
flag=1;
inFile.close();
if(flag==0)
//***************************************************************
//****************************************************************
void modify_account(int n)
int found=0;
account ac;
fstream File;
File.open("account.dat",ios::binary|ios::in|ios::out);
if(!File)
return;
15
while(File.read((char *) &ac, sizeof(account)) && found==0)
if(ac.retacno()==n)
ac.show_account();
ac.modify();
int pos=(-1)*sizeof(account);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
//***************************************************************
//****************************************************************
void delete_account(int n)
account ac;
ifstream inFile;
ofstream outFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
16
return;
outFile.open("Temp.dat",ios::binary);
inFile.seekg(0,ios::beg);
if(ac.retacno()!=n)
inFile.close();
outFile.close();
remove("account.dat");
rename("Temp.dat","account.dat");
//***************************************************************
//****************************************************************
void display_all()
account ac;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
return;
17
cout<<"====================================================\n";
cout<<"====================================================\n";
ac.report();
inFile.close();
//***************************************************************
//****************************************************************
int amt;
int found=0;
account ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
return;
if(ac.retacno()==n)
ac.show_account();
if(option==1)
18
cout<<"\n\n\tTO DEPOSITE AMOUNT ";
cin>>amt;
ac.dep(amt);
if(option==2)
cin>>amt;
int bal=ac.retdeposit()-amt;
cout<<"Insufficience balance";
else
ac.draw(amt);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
19
void intro()
cout<<"\n\n\n\t\t\t\t BANK";
cout<<"\n\n\t\t\t\t MANAGEMENT";
cout<<"\n\n\t\t\t\t SYSTEM";
getch();
void invalid()
20
Output
. INTRODUCTION
. MAIN MENU
21
. NEW ACCOUNT
.DEPOSIT AMOUNT
22
.WITHDRAW AMOUNT
. BALANCE ENQUIRY
23
. ALL ACCOUNT HOLDER LIST
. CLOSE AN ACCOUNT
24
. MODIFY AN ACCOUNT
. EXIT
25
BIBLIOGRAPHY
26