Académique Documents
Professionnel Documents
Culture Documents
Certificate
Acknowledgement
Source code
Visual Tour
Bibliography
CERTIFICATE
This is to certify that Devanshi Maheshwari of
class XII A has successfully completed the
project report on Banking under the
guidance of Mr. Madan Mohan Singh for the
fulfillment of CBSE board examination for
session
2014-2015.
(Examiners signature)
charge)
(Teacher In-
Date:
ACKNOWLEDGEMENT
I would like to express my sincere
gratitude to my computer science
mentor Mr. Madan Mohan Singh
for his vital support, guidance
and
encouragement
without
which the project could not have
been prepared
I would also like to express my
gratitude to the other staf
members
of
the
computer
department for their support
during the making of this project.
Source code
//***************************************************************
//
//****************************************************************
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<ctype.h>
//***************************************************************
//
//***************************************************************
//***************************************************************
//
//****************************************************************
class account
{
int acno;
char name[50];
int deposit, withdraw;
char type;
public:
void create_account()
{
cout<<"\nEnter The account No.: ";
cin>>acno;
cout<<"\n\nEnter The Name of The account Holder: ";
gets(name);
void show_account()
{
cout<<"\nAccount No. : "<<acno;
cout<<"\nAccount Holder Name : ";
puts(name);
cout<<"\nType of Account : "<<type;
cout<<"\nBalance amount : "<<deposit;
}
void modify_account()
{
cout<<"\nAccount No. : "<<acno;
cout<<"\nModify Account Holder Name : ";
gets(name);
cout<<"\nModify Type of Account : ";cin>>type;
cout<<"\nModify Balance amount : ";cin>>deposit;
void dep(int x)
{
deposit+=x;
}
void draw(int x)
{
deposit-=x;
}
void report()
{
cout<<acno<<"\t"<<name<<"\t\t"<<type<<"\t\t"<<deposit<<endl;
}
int retacno()
{
return acno;
}
float retdeposit()
{
return deposit;
}
char rettype()
{
return type;
}
};
//***************************************************************
//
//****************************************************************
fstream fp;
account ac;
//***************************************************************
//
//****************************************************************
void write_account()
{
fp.open("account.dat",ios::out|ios::app);
ac.create_account();
fp.write((char*)&ac,sizeof(account));
fp.close();
}
//***************************************************************
//
//****************************************************************
void display_sp(int n)
{
clrscr();
cout<<"\nBALANCE DETAILS\n";
int flag=0;
fp.open("account.dat",ios::in);
while(fp.read((char*)&ac,sizeof(account)))
{
if(ac.retacno()==n)
{
ac.show_account();
flag=1;
}
}
fp.close();
if(flag==0)
cout<<"\n\nAccount number does not exist";
getch();
}
//***************************************************************
//
//****************************************************************
void modify_account()
{
int no,found=0;
clrscr();
cout<<"\n\n\tTo Modify ";
cout<<"\n\n\tEnter The account No. of The account";
cin>>no;
fp.open("account.dat",ios::in|ios::out);
while(fp.read((char*)&ac,sizeof(account)) && found==0)
{
if(ac.retacno()==no)
{
ac.show_account();
cout<<"\nEnter The New Details of account"<<endl;
ac.modify_account();
int pos=-1*sizeof(ac);
fp.seekp(pos,ios::cur);
fp.write((char*)&ac,sizeof(account));
cout<<"\n\n\t Record Updated";
found=1;
}
}
fp.close();
if(found==0)
cout<<"\n\n Record Not Found ";
getch();
}
//***************************************************************
//
//****************************************************************
void delete_account()
{
int no;
clrscr();
cout<<"\n\n\n\tDelete Record";
cout<<"\n\nEnter The account no. of the customer You Want To
Delete";
cin>>no;
fp.open("account.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&ac,sizeof(account)))
{
if(ac.retacno()!=no)
{
fp2.write((char*)&ac,sizeof(account));
}
}
fp2.close();
fp.close();
remove("account.dat");
rename("Temp.dat","account.dat");
cout<<"\n\n\tRecord Deleted ..";
getch();
}
//***************************************************************
//
//****************************************************************
void display_all()
{
clrscr();
fp.open("account.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n Go To
Admin Menu to create File";
getch();
return;
}
cout<<"========================================
================\n";
cout<<"
A/c no.\t\t\tNAME\t\t\t\tType\t\t\t\tBalance\n";
cout<<"========================================
================\n";
while(fp.read((char*)&ac,sizeof(account)))
{
ac.report();
}
fp.close();
}
//***************************************************************
//
//****************************************************************
if(ac.retacno()==no)
{
ac.show_account();
if(option==1)
{
cout<<"\n\n\tTO DEPOSITE AMOUNT ";
cout<<"\n\nEnter The amount to be
deposited";
cin>>amt;
ac.dep(amt);
}
if(option==2)
{
cout<<"\n\n\tTO WITHDRAW AMOUNT ";
cout<<"\n\nEnter The amount to be withdraw";
cin>>amt;
int bal=ac.retdeposit()-amt;
if((bal<500 && ac.rettype()=='S') || (bal<1000
&& ac.rettype()=='C'))
cout<<"Insufficience balance";
else
ac.draw(amt);
}
int pos=-1*sizeof(ac);
fp.seekp(pos,ios::cur);
fp.write((char*)&ac,sizeof(account));
//***************************************************************
//
INTRODUCTION FUNCTION
//****************************************************************
void intro()
{
clrscr();
gotoxy(20,11);
cout<<"\n +++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++";
cout<<"\n +
***************************************
cout<<"\n +
*****************************************
cout<<"\n +
*******************************************
cout<<"\n +
*********************************************
+";
+";
+";
+";
cout<<"\n +
***********************************************
+";
cout<<"\n +
*************************************************
+";
cout<<"\n +
***************************************************
cout<<"\n +
***********************
+";
********************* WELCOME
+";
cout<<"\n +
***************************************************
cout<<"\n +
*************************************************
cout<<"\n +
***********************************************
cout<<"\n +
+";
+";
+";
*********************************************
+";
cout<<"\n +
*****************************************
cout<<"\n +
***************************************
cout<<"\n +
*************************************
+";
+";
+";
cout<<"\n +++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++";
getch();
clrscr();
gotoxy(20,11);
cout<<" BANK TRANSACTION SYSTEM\n ";
cout<<"\n\n\tMADE BY : * DEVANSHI MAHESHWARI * ";
cout<<"\n\n\tCLASS
: XII-A";
//***************************************************************
//
//****************************************************************
void main()
{
COLOUR(RED,BLACK);
char ch;
intro();
do
{
clrscr();
cout<<"\n\n\n\t@@@@@@@ MAIN 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";
//***************************************************************
//
END OF PROJECT
//***************************************************************
Visual Tour
HOME
INTRODUCTION
MAIN MENU
NEW ACCOUNT
DEPOSIT AMOUNT
WITHDRAW AMOUNT
BALANCE ENQUIRY
MODIFY ACCOUNT
DELETE ACCOUNT
Bibliography
Reference:
www.google.co.in
www.cplusplus.com
www.wikipedia.org
Books Referred: