ON Bank Management: Computer Science
ON Bank Management: Computer Science
PROJECT FILE
ON
BANK MANAGEMENT
Certificate
Acknowledgement
Synopsis
Requirements
Coding
Output
Limitations
Bibliography
CERTIFICATE
Date :
Registration No. :
__________________ __________________
Acknowledgement
#include<ctype.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
//***************************************************************
//****************************************************************
class MyAccount
int acno;
char name[40];
int deposit;
char type;
public:
acno = ac;
gets(name);
do
cin>>type;
type=toupper(type);
else
cout<<"\n\n\tInvalid Type.\n";
do{
char dep[10];
if( (type == 'C' && deposit >= 1000) || (type == 'S' && deposit
>= 500 ))
break; // if amount is valid exit this loop
else
cout<<"\n\n\tInvalid Amount\n";
cout<<"\n\n\nAccount Created..";
void MyAccount::Display_Account()
cout<<name;
void MyAccount::Modify_Rec()
gets(name);
do
cin>>type;
type=toupper(type);
if(type == 'C' || type == 'S')
else
cout<<"\n\n\tInvalid Type.\n";
do{
char dep[10];
if( (type == 'C' && deposit >= 1000) || (type == 'S' && deposit
>= 500 ))
else
cout<<"\n\n\tInvalid Amount\n";
void MyAccount::Deposit_Amt(int x)
deposit+=x;
void MyAccount::Withdraw_Amt(int x)
{
deposit-=x;
void MyAccount::Show_Report()
cout<<acno<<"\t\t"<<name<<"\t\t"<<type<<"\t"<<deposit<<endl;
int MyAccount::ret_acno()
return acno;
int MyAccount::ret_deposit()
return deposit;
char MyAccount::ret_type()
return type;
//***************************************************************
// function declaration
//****************************************************************
//***************************************************************
//****************************************************************
int main()
char ch;
char temp[10];
int num;
clrscr();
intro();
do
clrscr();
cout<<"\n\n\n\tMAIN MENU";
ch = getche();
switch(ch)
case '1':
clrscr();
write_account();
break;
case '2':
clrscr();
deposit_withdraw(num, 1);
break;
case '3':
clrscr();
deposit_withdraw(num, 2);
break;
case '4':
clrscr();
display_sp(num);
break;
case '5':
clrscr();
display_all();
break;
case '6':
clrscr();
delete_account(num);
break;
case '7':
clrscr();
modify_account(num);
break;
case '8':
clrscr();
break;
default :
getch();
}while(ch!='8');
return 0;
}
//***************************************************************
//****************************************************************
void write_account()
MyAccount ac;
fstream File;
File.open("account.dat", ios::binary|ios::in);
if(!File)
ac.New_Account(1000);
else{
ac.New_Account( (ac.ret_acno()+1) );
File.close();
//ofstream outFile;
File.open("account.dat",ios::binary|ios::app);
File.close();
//***************************************************************
void display_sp(int n)
MyAccount ac;
int flag=0;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
return;
cout<<"\nBALANCE DETAILS\n";
if(ac.ret_acno()==n)
ac.Display_Account();
flag=1;
inFile.close();
if(flag==0)
//***************************************************************
// function to modify record of file
//****************************************************************
void modify_account(int n)
int found=0;
MyAccount ac;
fstream File;
File.open("account.dat",ios::binary|ios::in|ios::out);
if(!File)
File.close();
return;
if(ac.ret_acno()==n)
ac.Display_Account();
ac.Modify_Rec();
int pos=(-1)*sizeof(MyAccount);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
//***************************************************************
//****************************************************************
void delete_account(int n)
MyAccount ac;
int flag=0;
ifstream inFile;
inFile.open("account.dat",ios::binary);
ofstream outFile;
outFile.open("Temp.dat",ios::binary);
if(!inFile)
return;
cout<<"\n\n";
if(ac.ret_acno()==n)
ac.Display_Account();
flag=1;
}
else
if(flag==0)
remove("Temp.dat");
return;
inFile.close();
outFile.close();
remove("account.dat");
rename("Temp.dat","account.dat");
//***************************************************************
//****************************************************************
void display_all()
MyAccount ac;
ifstream inFile;
inFile.open("account.dat",ios::binary);
if(!inFile)
cout<<"====================================================\n";
cout<<"====================================================\n";
ac.Show_Report();
inFile.close();
//***************************************************************
//****************************************************************
int amt;
int found=0;
MyAccount ac;
fstream File;
File.open("account.dat", ios::binary|ios::in|ios::out);
if(!File)
File.close();
return;
}
while(File.read((char *) &ac, sizeof(MyAccount)) && found==0)
if(ac.ret_acno()==n)
ac.Display_Account();
if(option==1)
cin>>amt;
ac.Deposite_Amt(amt);
if(option==2)
cin>>amt;
int bal=ac.ret_deposit()-amt;
cout<<"\n\n\tInsufficient Balance";
return;
else
ac.Withdraw_Amt(amt);
File.seekp(pos,ios::cur);
found=1;
File.close();
if(found==0)
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
cout<<"\n\n\n\t BANK";
cout<<"\n\n\tMANAGEMENT";
cout<<"\n\n\t SYSTEM";
getch();
REQUIREMENTS
HARDWARE REQUIRED
SOFTWARE REQUIRED
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
BIBLIOGRAPHY