Professional Documents
Culture Documents
PRADEE
PRADEE
Topic:-
Banking Management
:
-
-
CERTIFICATE
THIS IS TO CERITY THAT PRADEEP SINGH OF CLASS – XII ‘SCI’ SUCCESSFULLY COMPLETED
THEIR COMPUTER PROJECT ON “BANKING MANAGEMENT” UNDER THE ABLE GUIDANCE
OF
Signature : ……………….
Date : ……..…………
Acknowledgement
Thanking you
PRADEEP SINGH
Inference
Language: - c++
Conpect :- object orientated program & file handling
Software :- Notepad & MS Word
Compiler :- turboCdroid
Website:- www.icbse.nic.in
www.scribd.com
Program Source Code
#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:
void create_account();
void show_account();
}; void report();
int retacno();
void modify();
void dep(int); int retdeposit(); char rettype();
void draw(int);
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()
cout<<name;
void account::modify()
cin>>type;
type=toupper(type);
cin>>deposit;
void account::dep(int x)
deposit+=x;
void account::draw(int x)
deposit-=x;
void account::report()
int account::retacno()
return acno;
int account::retdeposit()
return deposit;
char account::rettype()
return type;
}
void intro();
void invalid();
int main()
char ch;
int num;
clrscr();
intro();
do
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cin>>ch;
clrscr();
if(ch<64||ch>123)
switch(ch)
case '1':
write_account();
break;
case '2':
case '3':
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':
invalid();
break;
else
cout<<"Inspite of WARNING you entered alphabets.... \n\n Program will Exit now.. ";
getch();
exit(0);
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)
*) &ac, sizeof(account))) {
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)
{
cout<<"File could not be open !! Press any Key..."; return;
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)
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)
cout<<"====================================================\n";
cout<<"====================================================\n";
inFile.close();
int amt;
int found=0;
account ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
if(ac.retacno()==n)
ac.show_account();
if(option==1)
cin>>amt;
ac.dep(amt);
if(option==2)
int bal=ac.retdeposit()-amt;
cout<<"Insufficience balance";
else
ac.draw(amt);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
void intro()
cout<<"\n\n\n\t\t\t\t BANK";
cout<<"\n\n\t\t\t\tMANAGEMENT";
cout<<"\n\n\t\t\t\t SYSTEM";
getch();
void invalid()
{
cout<<"\n\n\n\t\tInvalid Choice Entered..!!!"<<endl;
}
.
🡪
Output
. INTRODUCTION
. MAIN MENU
. NEW ACCOUNT
.DEPOSIT AMOUNT
.WITHDRAW AMOUNT
. BALANCE ENQUIRY
. ALL ACCOUNT HOLDER LIST
. CLOSE AN ACCOUNT
. MODIFY AN ACCOUNT
. EXIT
BIBLIOGRAPHY