Sei sulla pagina 1di 32

C++ BASED

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

This is to certify that Sanidhya Vijay of


class XIth A of Air Force Golden Jubilee
Institute has successfully completed his
computer project based on “Banking
System” as being prescribed by the CBSE
for the year 2018-2019.

MOHINI ARORA
(Lecturer Computer Science)
(Air Force Golden Jubilee Institute)
Acknowledgement

It would be my utmost pleasure to express


my sincere thanks to my computer
teacher Mrs. Mohini Arora in providing
a helping hand in this project.

Her valuable guidance, support and


supervision are responsible for attaining
its present from. I would also like to thank
Mr. Surender, the computer laboratory-
in-charge for extending great deal of help
in the successful completion of the project.
INTRODUCTION

Now Banking is at your fingertips!!!!

C++ Banking System is one of the easiest ways


of Digital Banking!!

From Creating a new account to Modifying


existing accounts, there's something for every
Account Holder!

Don't want an account? Remove it in simple


steps!!

Banking has never been so simple!!!


HARDware & software
requirements

Any PC with a basic dual core processor, 10 GB


of storage, 20 MB graphics card with a
keyboard and a mouse can run this program.

Software requirements for this program is a


Windows-based Operating System and DEV
C++ Application.
Header files and built-in
functions used

Header files used

1. iostream

2. conio.h

3. string.h

4. process.h

Built-in functions used

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>

using namespace std;

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];

void status_acc(int accno2,int k)

cout<<"\t\t\t-------------------------------------------------------";

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====ACCOUNT STATUS===="<<endl<<endl<<endl;

if(accno2==A1[k].number)

cout<<"NAME: "<<A1[k].name<<endl;

cout<<"ACCOUNT NUMBER: "<<A1[k].number<<endl;

cout<<"ACCOUNT TYPE: "<<A1[k].type<<endl;

cout<<"AVAILABLE BALANCE: "<<A1[k].balance<<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<<"\n\n\n\t\t\t\t\t\t ====MAIN MENU===="<<endl<<endl<<endl<<endl;

cout<<"\t\t\t\t\t\t1) ABOUT THE SYSTEM"<<endl;


cout<<"\t\t\t\t\t\t2) CREATE NEW ACCOUNT"<<endl;

cout<<"\t\t\t\t\t\t3) DEPOSIT AMOUNT"<<endl;

cout<<"\t\t\t\t\t\t4) WITHDRAW AMOUNT"<<endl;

cout<<"\t\t\t\t\t\t5) BALANCE ENQUIRY"<<endl;

cout<<"\t\t\t\t\t\t6) MODIFY AN ACCOUNT"<<endl;

cout<<"\t\t\t\t\t\t7) DELETE AN ACCOUNT"<<endl;

cout<<"\t\t\t\t\t\t8) COMPLETE ACCOUNT HOLDER'S LIST"<<endl;

cout<<"\t\t\t\t\t\t9) EXIT"<<endl;

RECHOICE: cout<<"\n\n\t\t\t\t\t\tEnter your choice: ";

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;

cout<<"\t\t\t\t\t ====ALL ABOUT C++ BANKING===="<<endl<<endl<<endl;

cout<<"Now Banking is at your fingertips!!!!"<<endl;

cout<<"C++ Banking System is one of the easiest ways of Digital Banking!!"<<endl;

cout<<"From Creating a new account to Modifying existing accounts, there's


something for every Account Holder!"<<endl;

cout<<"Don't want an account? Remove it in simple steps!!"<<endl;

cout<<"Banking has never been so simple!!!"<<endl;

void new_acc()

int n=0;

person++;

if(person>=7)

cout<<"SORRY!!! Not enough space for anymore Account Holders"<<endl;

exit(0);

cout<<endl<<endl<<endl;
cout<<"\t\t\t\t\t ====NEW ACCOUNT CREATION FORM===="<<endl<<endl<<endl;

RENEW: cout<<"Enter the Account Number: ";

int z;

cin>>z;

cin.ignore();

for(int m=0;m<7;m++)

{ if(z==1001||z==1002||z==1003||z==1004||z==1005)

cout<<"Error!!! The Account Number entered is already assocciated with a pre-


existing account!"<<endl;

goto RENEW;

break;

else

A1[person].number=z;

n=5;

break;

if(n==5)

cout<<"\nEnter the Name of the Account Holder: ";

gets(A1[person].name);

cout<<endl;

cout<<"Enter the Desired Password: ";

gets(A1[person].password);

cout<<endl;

do
{

cout<<"Enter the Type of Account that you want to create(S=Savings/C=Current): ";

cin>>A1[person].type;

if(A1[person].type!='S'&&A1[person].type!='C'&&A1[person].type!='s'&&A1[person].ty
pe!='c')

cout<<"Sorry!!! Wrong Input!"<<endl;

}while(A1[person].type!='S'&&A1[person].type!='C'&&A1[person].type!='s'&&A1[person
].type!='c');

do

cout<<"\nEnter Minimum amount to open the Account(>=500 for Savings/>=1000 for


Current): ";

cin>>A1[person].balance;

if((A1[person].type=='s'||A1[person].type=='S')&&A1[person].balance<500)

cout<<"Sorry!!! Not enough minimum amount to open the Account in Savings!"<<endl;

else if((A1[person].type=='c'||A1[person].type=='C')&&A1[person].balance<1000)

cout<<"Sorry!!! Not enough minimum amount to open the Account in Current!"<<endl;

}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')));

cout<<"\n\nAccount Created Successfully!!!!"<<endl;

void deposit_acc()

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====MONEY DEPOSIT FORM===="<<endl<<endl<<endl;

do

cout<<"Enter the Account Number: ";

cin>>accno;
cin.ignore();

cout<<endl;

cout<<"Enter the Password: ";

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<<"Enter the amount to be deposited: ";

cin>>accdep;

cout<<endl;

A1[i].balance=A1[i].balance+accdep;

cout<<"The updated balance is: "<<A1[i].balance<<endl;

else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)==1)

j++;

if(j==7)

cout<<"Error!!! The Account Number or the Password is Incorrect!"<<endl;

}while(j==7);

}
void withdraw_acc()

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====MONEY WITHDRAWAL FORM===="<<endl<<endl<<endl;

do

cout<<"Enter the Account Number: ";

cin>>accno;

cin.ignore();

cout<<endl;

cout<<"Enter the Password: ";

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<<"Enter the Amount to be withdrawn: ";

cin>>accdep;

cout<<endl;

A1[i].balance=A1[i].balance-accdep;

cout<<"The updated balance is: "<<A1[i].balance<<endl;

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;

cout<<"\t\t\t\t\t ====BALANCE ENQUIRY FORM===="<<endl<<endl<<endl;

do

cout<<"Enter the Account Number: ";

cin>>accno;

cin.ignore();

cout<<endl;

cout<<"Enter the Password: ";

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<<"The available balance in the account is: ";

cout<<A1[i].balance;

cout<<endl;

else if(A1[i].number!=accno||strcmpi(accpass,A1[i].password)!=0)

j++;
}

if(j==7)

cout<<"Error!!! The account does not exist!"<<endl;

}while(j==7);

void modify_acc()

int n;

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====ACCOUNT MODIFICATION FORM===="<<endl<<endl<<endl;

cout<<"Enter the Account Number: ";

cin>>accno;

cin.ignore();

cout<<endl;

cout<<"Enter the Password: ";

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;

REMOD: cout<<"Enter the Account Number: ";

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)
{

cout<<"Error!!! The Account Number entered is already assocciated with a pre-


existing account!"<<endl;

goto REMOD;

break;

else

A1[person].number=d;

c=5;

break;

if(c==5)

cout<<"\nEnter New Name of the Account Holder: ";

gets(A1[i].name);

cout<<endl;

cout<<"Enter the Desired New Password: ";

gets(A1[i].password);

cout<<endl;

do

cout<<"Enter the Type of Account that you want to change to(S=Savings/C=Current):


";

cin>>A1[i].type;

if(A1[i].type!='S'&&A1[i].type!='C'&&A1[i].type!='s'&&A1[i].type!='c')

cout<<"Sorry!!! Wrong Input!"<<endl;

}while(A1[i].type!='S'&&A1[i].type!='C'&&A1[i].type!='s'&&A1[i].type!='c');

do
{

cout<<"\nEnter the New Balance(>=500 for Savings/>=1000 for Current): ";

cin>>A1[i].balance;

if(A1[i].balance<500)

cout<<"Sorry!!! Not enough minimum amount to open the Account!"<<endl;

}while(A1[i].balance<500);

cout<<"\n\nAccount Modified Successfully!!!!"<<endl;

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 delete_acc()

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====ACCOUNT DELETION FORM===="<<endl<<endl<<endl;

do

cout<<"Enter the Account Number: ";

cin>>accno;

cin.ignore();

cout<<endl;

cout<<"Enter the Password: ";

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';

cout<<"Account Successfully Deleted"<<endl;

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 holder_acc()

cout<<endl<<endl<<endl;

cout<<"\t\t\t\t\t ====ACCOUNT HOLDERS' LIST===="<<endl<<endl<<endl;

for(l=0;l<240;l++)

cout<<"=";

cout<<endl;

cout<<"A/C NUMBER NAME TYPE(C/S/D)


BALANCE" <<endl;
for(l=0;l<240;l++)

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

Potrebbero piacerti anche