Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BANKING SYSTEM
Sanidhya Vijay
XIth A
INDEX
1. CERTIFICATE
2. ACKOWLEDGEMENT
3. INTRODUCTION
4. HARDWARE AND SOFTWARE
REQUIREMENTS
5. HEADER FILES AND BUILT-IN
FUNCTIONS USED
6. SOURCE CODE
7. OUTPUT SCREENS
8. BIBLIOGRAPHY
Certificate
MOHINI ARORA
(Lecturer Computer Science)
(Air Force Golden Jubilee Institute)
Acknowledgement
1. iostream
2. conio.h
3. string.h
4. process.h
1. strcpy
2. system(“cls”)
3. exit(0)
4. gets
5. getch
6. cin.ignore
SOURCE code
#include<iostream>
#include<conio.h>
#include<string.h>
#include<process.h>
void about_acc();
void new_acc();
void deposit_acc();
void withdraw_acc();
void enquiry_acc();
void modify_acc();
void delete_acc();
void holder_acc();
struct Account
int number;
char name[100];
char password[100];
char type;
float balance;
}A1[7];
cout<<"\t\t\t-------------------------------------------------------";
cout<<endl<<endl<<endl;
if(accno2==A1[k].number)
cout<<"NAME: "<<A1[k].name<<endl;
cout<<"\t\t\t-------------------------------------------------------";
int a,choice,person=4,accno,accdep,i,j=0,k,l,m;
char accpass[100],x;
int main()
strcpy(A1[0].name,"Sanidhya Vijay");
strcpy(A1[1].name,"Sanjit Kumar");
strcpy(A1[2].name,"Alka Sanjit");
strcpy(A1[3].name,"Ankush Gupta");
strcpy(A1[4].name,"Rajiv Dixit");
A1[0].number=1001;
A1[1].number=1002;
A1[2].number=1003;
A1[3].number=1004;
A1[4].number=1005;
A1[0].type='C';
A1[1].type='S';
A1[2].type='C';
A1[3].type='C';
A1[4].type='S';
strcpy(A1[0].password,"012345");
strcpy(A1[1].password,"123456");
strcpy(A1[2].password,"234567");
strcpy(A1[3].password,"345678");
strcpy(A1[4].password,"456789");
A1[0].balance=1000;
A1[1].balance=1500;
A1[2].balance=1800;
A1[3].balance=2100;
A1[4].balance=4000;
REMENU:
for(int a=0;a<480;a++)
cout<<"*";
cout<<endl<<endl<<endl;
cout<<"\t\t\t|||||||||||||||||||||||||||BANKING
SYSTEM||||||||||||||||||||||||||||||"<<endl;
cout<<"\t\t\t\t\t\t9) EXIT"<<endl;
cin>>choice;
cout<<endl;
if(choice==1||choice==2||choice==3||choice==3||choice==4||choice==5||choice==6||ch
oice==7||choice==8)
system("cls");
switch(choice)
case 1:
about_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
exit(0);
system("cls");
}
break;
case 2:
new_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
exit(0);
system("cls");
break;
case 3:
deposit_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
{
exit(0);
system("cls");
break;
case 4:
withdraw_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
exit(0);
system("cls");
break;
case 5:
enquiry_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
}
else
exit(0);
system("cls");
break;
case 6:
modify_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
exit(0);
system("cls");
case 7:
delete_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
{
system("cls");
goto REMENU;
else
exit(0);
system("cls");
break;
case 8:
holder_acc();
cout<<"To go to the Main Menu press m, otherwise to end the program press any
other key: ";
cin>>x;
if(x=='m'||x=='M')
system("cls");
goto REMENU;
else
exit(0);
system("cls");
break;
case 9:
exit(0);
break;
default: cout<<"\t\t\t\t\t\tError!!! Wrong Input!";
goto RECHOICE;
break;
void about_acc()
cout<<endl<<endl<<endl;
void new_acc()
int n=0;
person++;
if(person>=7)
exit(0);
cout<<endl<<endl<<endl;
cout<<"\t\t\t\t\t ====NEW ACCOUNT CREATION FORM===="<<endl<<endl<<endl;
int z;
cin>>z;
cin.ignore();
for(int m=0;m<7;m++)
{ if(z==1001||z==1002||z==1003||z==1004||z==1005)
goto RENEW;
break;
else
A1[person].number=z;
n=5;
break;
if(n==5)
gets(A1[person].name);
cout<<endl;
gets(A1[person].password);
cout<<endl;
do
{
cin>>A1[person].type;
if(A1[person].type!='S'&&A1[person].type!='C'&&A1[person].type!='s'&&A1[person].ty
pe!='c')
}while(A1[person].type!='S'&&A1[person].type!='C'&&A1[person].type!='s'&&A1[person
].type!='c');
do
cin>>A1[person].balance;
if((A1[person].type=='s'||A1[person].type=='S')&&A1[person].balance<500)
else if((A1[person].type=='c'||A1[person].type=='C')&&A1[person].balance<1000)
}while(((A1[person].balance<500)&&(A1[person].type=='s'||A1[person].type=='S'))||(
(A1[person].balance<1000)&&(A1[person].type=='c'||A1[person].type=='C')));
void deposit_acc()
cout<<endl<<endl<<endl;
do
cin>>accno;
cin.ignore();
cout<<endl;
gets(accpass);
cout<<endl;
for(i=0;i<7;i++)
if(A1[i].number==accno&&strcmpi(accpass,A1[i].password)==0)
status_acc(accno,i);
cout<<endl;
cin>>accdep;
cout<<endl;
A1[i].balance=A1[i].balance+accdep;
else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)==1)
j++;
if(j==7)
}while(j==7);
}
void withdraw_acc()
cout<<endl<<endl<<endl;
do
cin>>accno;
cin.ignore();
cout<<endl;
gets(accpass);
cout<<endl;
for(i=0;i<7;i++)
if(A1[i].number==accno&&strcmpi(accpass,A1[i].password)==0)
status_acc(accno,i);
cout<<endl;
cin>>accdep;
cout<<endl;
A1[i].balance=A1[i].balance-accdep;
else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)!=0)
j++;
if(j==7)
cout<<"Error!!! The Account Number or the Password is Incorrect!"<<endl;
}while(j==7);
void enquiry_acc()
cout<<endl<<endl<<endl;
do
cin>>accno;
cin.ignore();
cout<<endl;
gets(accpass);
cout<<endl;
for(i=0;i<7;i++)
if(A1[i].number==accno&&strcmpi(accpass,A1[i].password)==0)
status_acc(accno,i);
cout<<endl;
cout<<A1[i].balance;
cout<<endl;
else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)!=0)
j++;
}
if(j==7)
}while(j==7);
void modify_acc()
int n;
cout<<endl<<endl<<endl;
cin>>accno;
cin.ignore();
cout<<endl;
gets(accpass);
cout<<endl;
for(i=0,n=0;i<7;i++)
if(A1[i].number==accno&&strcmpi(accpass,A1[i].password)==0)
status_acc(accno,i);
cout<<endl;
int c,d;
cin>>d;
cin.ignore();
for(int m=0;m<7;m++)
{ if(d==1001||d==1002||d==1003||d==1004||d==1005)
{
goto REMOD;
break;
else
A1[person].number=d;
c=5;
break;
if(c==5)
gets(A1[i].name);
cout<<endl;
gets(A1[i].password);
cout<<endl;
do
cin>>A1[i].type;
if(A1[i].type!='S'&&A1[i].type!='C'&&A1[i].type!='s'&&A1[i].type!='c')
}while(A1[i].type!='S'&&A1[i].type!='C'&&A1[i].type!='s'&&A1[i].type!='c');
do
{
cin>>A1[i].balance;
if(A1[i].balance<500)
}while(A1[i].balance<500);
else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)!=0)
j++;
if(j==7)
}while(j==7);
void delete_acc()
cout<<endl<<endl<<endl;
do
cin>>accno;
cin.ignore();
cout<<endl;
gets(accpass);
cout<<endl;
for(i=0;i<7;i++)
if(A1[i].number==accno&&strcmpi(accpass,A1[i].password)==0)
status_acc(accno,i);
cout<<endl;
strcpy(A1[i].name,"DELETED");
A1[i].balance=0;
A1[i].number=0;
strcpy(A1[i].password,"DELETED");
A1[i].type='D';
else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)!=0)
j++;
if(j==7)
}while(j==7);
void holder_acc()
cout<<endl<<endl<<endl;
for(l=0;l<240;l++)
cout<<"=";
cout<<endl;
cout<<"=";
for(l=0;l<7;l++)
cout<<A1[l].number<<" "<<A1[l].name<<"
"<<A1[l].type<<" "<<A1[l].balance<<endl;
for(int l=0;l<240;l++)
cout<<"-";
}
OUTPUT SCREENS
MAIN MENU
ABOUT
CREATING A NEW ACCOUNT
DEPOSITING MONEY
WITHDRAWING MONEY
BALANCE ENQUIRY
MODIFYING AN ACCOUNT
DELETING AN ACCOUNT
LIST OF ACCOUNT HOLDERS
EXITING
Bibliography
1.www.cppforschools.com
2.www.stackoverflow.com