0% found this document useful (0 votes)
133 views

Computer Science Project On Banking System

Computer science Project on banking System

Uploaded by

AkashMurali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views

Computer Science Project On Banking System

Computer science Project on banking System

Uploaded by

AkashMurali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

INDEX

Certificate..............................................2
Acknowledgement....................................3
About C++...............................................4
Introduction.............................................6
Flow chart...............................................7
Source code............................................8
Screenshots..........................................42

Page | 1

Certificate
This is to certify that Akash M.S , a student
of class XII-L has successfully completed the
research on the below mentioned project
under the guidance of Mrs. Smitha
(Computer Science Teacher) during the year
2015-16 in partial fulfillment of Computer
Science practical examination conducted by
AISSCE, New Delhi.

External examiner
Computer Science Teacher

Acknowledgement

Page | 2

In the accomplishment of this project successfully,


many people have best owned upon me their blessings
and the heart pledged support, this time I am utilizing
to thank all the people who have been concerned with
the project.
Primarily I would thank god for being able to complete
this project with success. Then I would like to thank my
computer science teachers Mrs.Smitha & Mr.Pius,
whose valuable guidance has been the ones that
helped me patch this project and make it full proof
success.
Then I would like to thank my teammates Jewel MJ,
Nandagopal Ramamurthy ,Shahbaz & my friends who
have made valuable suggestions which had given an
inspiration to improve this project. I thank all the people
for their help both directly and indirectly to complete
this project.

About C++

Page | 3

C++ is an object oriented programming (OOP)


language, developed by Bjarne Stroustrup, and is an
extension of C language. It is therefore possible to code
C++ in a "C style" or "object-oriented style." In certain
scenarios, it can be coded in either way and is thus an
effective example of a hybrid language.
C++ is a general purpose object oriented programming
language. It is considered to be an intermediate level
language, as it encapsulates both high and low level
language features. Initially, the language was called 'C
with classes as it had all properties of C language with
an additional concept of 'classes. However, it was
renamed to C++ in 1983.
C++ is one of the most popular languages primarily
utilized with system/application software, drivers,
client-server applications and embedded firmware.
The main highlight of C++ is a collection of pre-defined
classes, which are data types that can be instantiated
multiple times. The language also facilitates declaration
of user defined classes. Classes can further
accommodate member functions to implement specific
functionality. Multiple objects of a particular class can
be defined to implement the functions within the class.
Objects can be defined as instances created at run
time. These classes can also be inherited by other new
classes which take in the public and protected
functionalities by default.
C++ includes several operators such as comparison,
arithmetic, bit manipulation, logical operators etc. One
of the most attractive features of C++ is that it enables
the overloading of certain operators such as addition.

Page | 4

A few of the essential concepts within C++


programming language include polymorphism, virtual
and friend functions, templates, namespaces and
pointers.

Introduction

The program can be used by a person to do daily


banking transactions .The functioning of the program is
so designed that it is very easy to understand and
operate.
Page | 5

There are 4 main options in the main menu. They are


Transactions, Create Account, Search and Display &
Delete Account.
The transactions menu has three sub divisions
Deposit, Withdraw & Loan. The deposit option can be
used to deposit a certain amount of money to a specific
account. The withdraw option can be used to withdraw
a certain amount of money from a specific account. The
loan option is used to obtain a loan from the bank.
Search and display menu also has three sub divisions
User display, report and modify. User display is used to
display the details of an account by using the account
number of the account. Report option gives the detailed
report of all the accounts present in the bank.
The create account option is used to create a new
account and the delete account option can be used to
delete an account from the bank.
To make the project look more fascinating a loading
screen, special border displays, elliptical beats etc. has
been used.
This program provides an accurate and timely interface
in bank management.
Flow chart

Page | 6

LOGIN
SCREEN

MAIN MENU

TRANSACTI
ON

CREATE
ACCOUNT

SEARCH &
DISPLAY

DEPOSIT

USER
DISPLAY

WITHDRAW

REPORT

LOAN

MODIFY

DELETE
ACCOUNT

Page | 7

Source code
//-----------------------------------------------------------------//***************
HEADER FILES USED
****************
//-----------------------------------------------------------------#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<process.h>
#include<math.h>
#include<fstream.h>
#include<iomanip.h>
#include<ctype.h>
//-----------------------------------------------------------------//***************
FUNCTION DECLARATIONS
****************
//-----------------------------------------------------------------void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void

loading(int);
delay(float);
Jscreen(int);
screen();
clearoff(int,int,int,int,float);
caption(int,int);
logo(int,int,int,float);
press(int);
menu();
login();
Nscreen(int);
keys1();
transaction();
menu_();
keys2(int);
iaddaccount();
searchdisplay();

Page | 8

int iuserdisplay(int,int);
void ireport();
void imodify();
void impress();
int check(char[],int[],char,int[],int[],char[]);
int irandom(int,int);
void border(int,float);
void border2(int,int,int,int,float);
void beat(int,int,int,float,int);
void arrow(int);
void idepositwithdraw(int);
int keys3(int);
void iloan();
void column(int,int);
void ideleteaccount();
void verify();

int i,j,k,m; // global variables


//------------------------------------------------------------------------//**********************
THE MAIN BANK CLASS
**********************
//------------------------------------------------------------------------class bank
{
int acc;
char name[50];
long int cash;
char type;
long int tele;
char address[50];
public:
void addaccount(int);
void searchindividual();
void report(int);
void modify();
void deposit(long int);
void withdraw(long int);
void loan();
int raccno()
{
return acc;
}
char rname()
{
return name[50];
}
int rcash()
{
return cash;
}
char rtype()
{
return type;
}
};

Page | 9

//------------------------------------------------------------------------//***************** FUNCTION TO DISPLAY THE LOGO&BORDER*******************


//------------------------------------------------------------------------void impress()
{
clrscr();int q=rand()%4;
for(i=0;i<2;i++)arrow(6);
gotoxy(1,1);
border2(1,1,80,24,4.5);
border2(2,2,79,23,4.5);
gotoxy(1,1);
for(i=0;i<4;i++)arrow(3);
border2(1,1,80,24,4.5);
logo(15,5,1,4);caption(12,7);delay(5);
gotoxy(14,18);cout<<"Thank You for using our Services, See You
soon!";irandom(1,q);
gotoxy(20,22);cout<<" 2015-2016 JANS PVT LIMITED";delay(7);
}

//------------------------------------------------------------------------//***************** FUNCTION TO CREATE THE BINARY FILE ******************


//-------------------------------------------------------------------------

void iaddaccount()
{
bank M;
ofstream outfile;
outfile.open("bank.dat",ios::binary|ios::app);
M.addaccount(1);
outfile.write((char *)&M,sizeof(M));
outfile.close();
menu();
}

//------------------------------------------------------------------------//****************
FUNCTION TO CREATE AN ACCOUNT
******************
//-------------------------------------------------------------------------

void bank::addaccount(int h)
{
int t=0;Jscreen(0);
o:;
if(h==1)
{
char A[20]={
'$',' ','C','R','E','A','T','E','
;
for(i=4,j=0;i<0,j<16;i++,j++)
{
gotoxy(5,i); delay(6);
cout<<A[j];

',' A', 'C','C', 'O','U','N' ,'T'}

Page | 10

gotoxy(75,i);
cout<<A[j];
}
}
gotoxy(8,4);
cout<<"$Name:";
gotoxy(16,3);
cout<<"|----------------------------------------------------|";
gotoxy(16,4);
cout<<"$ $";
gotoxy(16,5);
cout<<"|----------------------------------------------------|";
gotoxy(8,7);
cout<<"$A/c No:";
gotoxy(16,6);
cout<<"|--------------------|";
gotoxy(16,7);
cout<<"$ $";//pause
gotoxy(16,8);
cout<<"|--------------------|";
gotoxy(42,7);
cout<<"$A/c Type:";
gotoxy(43,8);
cout<<"[C/S]";
gotoxy(52,6);
cout<<"|----------------|";
gotoxy(52,7);
cout<<"$ $";
gotoxy(52,8);
cout<<"|----------------|";
gotoxy(8,10);
cout<<"$Phone :";
gotoxy(9,11);
cout<<"Number";
gotoxy(16,9);
cout<<"|--------------------|";
gotoxy(16,10);
cout<<"$ $";
gotoxy(16,11);
cout<<"|--------------------|";
gotoxy(42,10);
if(h==1)cout<<"$Initial:";if(h==2)cout<<"$Modified";
gotoxy(45,11);
cout<<"Fund";
gotoxy(52,9);
cout<<"|----------------|";
gotoxy(52,10);
cout<<"$ $";
gotoxy(52,11);
cout<<"|----------------|";
gotoxy(8,13);
cout<<"$Address:";
gotoxy(16,12);
cout<<"|----------------------------------------------------|";
gotoxy(16,13);
cout<<"$ $";
gotoxy(16,14);
cout<<"|----------------------------------------------------|";
gotoxy(12,15);
cout<<"I hereby accknowledge that the above provided information";
gotoxy(12,16);
cout<<"is correct";
gotoxy(30,17);
cout<<"|----------|";
gotoxy(30,18);
cout<<"$ CLEAR $";
gotoxy(30,19);
cout<<"|----------|";
gotoxy(47,17);
cout<<"|----------|";column(3,0);gotoxy(13,22);cout<<" Press ESC to
LOGOUT Press BACKSPACE to go back";
gotoxy(47,18);if(h==1)cout<<"$ CREATE $";
if(h==2)cout<<"$ MODIFY $";

Page | 11

gotoxy(47,19);cout<<"|----------|";
if(h==2|t==1)
{
gotoxy(17,4);
cout<<name;
gotoxy(17,7);
cout<<acc;
gotoxy(17,10);
cout<<" ";
gotoxy(17,10);
cout<<"+973";
gotoxy(21,10);
cout<<tele;
gotoxy(53,7);
cout<<type;
gotoxy(53,10);
cout<<cash;
gotoxy(17,13);
cout<<address;
}
int ch,p=0; x:if(p==0)
{
{
gotoxy(49,18);cout<<" ";
gotoxy(7,4);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
if(h==1)p=1;else if(h==2)p=2;
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=7;
gotoxy(7,4);cout<<" ";
}
}
if(p==1)
{
{
gotoxy(7,4);cout<<" ";
gotoxy(7,7);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=2;
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=0;
gotoxy(7,7);cout<<" ";
gotoxy(7,4);cout<<">";
}
}
if(p==2)
{
{
if(h==2){
gotoxy(7,4);cout<<" ";
}
gotoxy(7,7);cout<<" ";
gotoxy(41,7);cout<<">";

Page | 12

}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91) p=3;
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
if(h==1){
p=1;
gotoxy(41,7);cout<<" ";
gotoxy(7,7);cout<<">";
}
if(h==2){
p=0;gotoxy(41,7);cout<<" ";
}
}
}
if(p==3){
{
gotoxy(41,7);cout<<" ";
gotoxy(7,10);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)p=4;
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=2;
gotoxy(7,10);cout<<" ";
gotoxy(41,7);cout<<">";
}
}
if(p==4)
{
{
gotoxy(7,10);cout<<" ";
gotoxy(41,10);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)p=5;
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=3;
gotoxy(41,10);cout<<" ";
gotoxy(7,10);cout<<">";
}
}
if(p==5){
{
gotoxy(41,10);cout<<" ";
gotoxy(7,13);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)p=6;
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=4;

Page | 13

gotoxy(7,13);cout<<" ";
gotoxy(41,10);cout<<">";
}
}
if(p==6)
{
{
gotoxy(7,13);cout<<" ";
gotoxy(32,18);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)p=7;
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=5;
gotoxy(32,18);cout<<" ";
}
}
if(p==7)
{
{
gotoxy(32,18);cout<<" ";
gotoxy(49,18);cout<<">";
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=0;gotoxy(49,18);cout<<" ";
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=6;
gotoxy(49,18);cout<<" ";
}
}
if(ch==27)screen();
if(ch==8)menu();
if(ch==115||ch==83||ch==107||ch==75)
{
if( p==0)
{
if(h==1)p=1;if(h==2)p=3;gotoxy(7,4);cout<<" ";
}
else if(p==1)
{
p=3;gotoxy(7,7);cout<<" ";
}
else
if(p==2)
{
p=4;gotoxy(41,7);cout<<" ";
}
else if(p==3||p==4)
{
p=5;

Page | 14

gotoxy(7,10);cout<<" ";
gotoxy(41,10);cout<<" ";
}
else
{

if(p==5)
p=6;
gotoxy(7,13);cout<<" ";

}
}
if(ch==68||ch==100||ch==108||ch==76)
{
if( p==1)
{
p=2;gotoxy(7,7);cout<<" ";
}
else if(p==3)
{
p=4;
gotoxy(41,10);cout<<" ";
}
else if(p==6)
{
p=7;
gotoxy(32,18);cout<<" ";
}
}
if(ch==97||ch==65||ch==106||ch==74)
{
if( p==2)
{
if(h==1)p=1;
gotoxy(41,7);cout<<" ";
}
else if(p==4)
{
p=3;
gotoxy(41,10);cout<<" ";
}
else if(p==7)
{
p=6;
gotoxy(49,18);cout<<" ";
}
}
if(ch==87||ch==119||ch==73||ch==105)
{
if(p==1||p==2)
{
p=0;gotoxy(41,7);cout<<" ";
gotoxy(7,7);cout<<" ";
}
if(p==3){
if(h==1)p=1;if(h==2)p=2;
gotoxy(7,10);cout<<" ";
}
if(p==4){
p=2;gotoxy(41,10);cout<<" ";

Page | 15

}
if(p==5)
{
p=3;
gotoxy(7,13);cout<<" ";
}
if(p==6||p==7)
{
p=5;
gotoxy(32,18);cout<<" ";gotoxy(49,18);cout<<" ";
}
}
if(ch==13)
{
if(p==0)
{
gotoxy(7,4);cout<<" ";
gotoxy(17,4);cout<<" ";
gotoxy(17,4);gets(name);
}
if(h==1)
if(p==1)
{
gotoxy(7,7);cout<<" ";
gotoxy(17,7);cout<<" ";
gotoxy(17,7);cin>>acc;
}
if(p==2)
{
gotoxy(41,7);cout<<" ";
gotoxy(53,7);cout<<" ";
gotoxy(53,7);cin>>type;
type=toupper(type);
}
if(p==3)
{
gotoxy(7,10);cout<<" ";
gotoxy(17,10);cout<<" ";
gotoxy(17,10);cout<<"+973";
gotoxy(21,10);cin>>tele;
}
if(p==4)
{
gotoxy(41,10);cout<<" ";
gotoxy(53,10);cout<<" ";
gotoxy(53,10);cin>>cash;
}
if(p==5)
{
gotoxy(7,13);cout<<" ";
gotoxy(17,13);cout<<" ";
gotoxy(17,13);gets(address);
}
if(p==6)
{
if(h==1)
{

Page | 16

clrscr();
addaccount(1);
}
if(h==2)
{
clrscr();addaccount(2);
}
}
if(p==7)
{
if(!(isalpha(name[1])&&isalpha(name[2])&&isalpha(name[3])))
{
clearoff(3,78,2,22,0);
gotoxy(20,11);
cout<<"Enter more than 3 alphabets for the name ";
gotoxy(31,12);
cout<<" Please try Again";
delay(6.5);
goto o;
}
if(!(acc>1000&&acc<10000))
{
clearoff(3,78,2,22,0);
gotoxy(26,11);
cout<<"Invalid Account Number Format";
gotoxy(31,12);
cout<<" Please try Again";
delay(6.5);
goto o;
}
if(!(type=='C'||type=='S'))
{
clearoff(3,78,2,22,0);
gotoxy(12,11);
cout<<" Invalid type ";
gotoxy(25,12);
cout<<" Please try Again";
delay(6.5);goto o;
}
if(!(tele>10000000&&tele<100000000))
{
clearoff(3,78,2,22,0);
gotoxy(30,11);
cout<<"Invalid Telephone Number";
gotoxy(33,12);
cout<<" Please try Again";
delay(6.5);
goto o;
}
if(!
(isalpha(address[1])&&isalpha(address[2])&&isalpha(address[3])))
{
clearoff(3,78,2,22,0);
gotoxy(20,11);
cout<<"Enter more than 3 alphabets for the address ";
gotoxy(32,12);
cout<<" Please try Again";

Page | 17

delay(6.5);
goto o;
}
Jscreen(0);
gotoxy(10,15);
cout<<"You thereby accknowledge to the BIGB's Terms and
Conditions";
if(h==1)
{
gotoxy(10,16);cout<<" Do you wish to Accept and Continue?";
}
if(h==2)
{
gotoxy(8,16);cout<<" Do you wish to Modify?";
}
column(2,1); int g=keys3(1);
if(g==0)
{
clrscr();loading(5);impress();
goto p;
}
if(g==1)
{
t=1;clearoff(4,74,4,22,0);goto o;
}
if(ch)goto x;
}
}
goto x;
p:;
}

//------------------------------------------------------------------------//***** FUNCTION WHICH ENABLES CURSOR MOVEMENT THROUGH KEYBOARD (III)******


//------------------------------------------------------------------------

int keys3(int l)
{
int g=0; char c; l: if(g==0)
{
{
gotoxy(46,20);cout<<"
";gotoxy(26,20);cout<<"$";if(l==1)logo(13,5,1,2.8);
}
c=getch();
if(c==62||c==46||c==9||c==45||c==91)g=1;
else
if(c==60||c==44||c==32||c==61||c==93)
{
g=1;
gotoxy(26,20);cout<<" ";
}
}
if(g==1)
{

Page | 18

{
gotoxy(26,20);cout<<" ";
gotoxy(46,20);cout<<"$";if(l==1)logo(13,5,1,2.8);
}
c=getch();
if(c==62||c==46||c==9||c==45||c==91)g=0;
else
if(c==60||c==44||c==32||c==61||c==93)
{
g=0;
gotoxy(46,20);cout<<" ";
}
}
if(c==68||c==100||c==108||c==76)
{
if( g==0)
{
g=1;gotoxy(46,20);cout<<" ";
}
}
if(c==97||c==65||c==106||c==74)
{
if( g==1)
{
g=0;gotoxy(26,20);cout<<" ";
}
}
if(c==13)return g;
if(c)goto l;goto l;
}

//------------------------------------------------------------------------//************** FUNCTION TO SEARCH AND DISPLAY AN ACCOUNT ****************


//------------------------------------------------------------------------int iuserdisplay(int a,int r=1)
{
int n;
if(r==1)
Nscreen(5);
int q=0;bank J;
ifstream infile;
infile.open("bank.dat",ios::binary|ios::in);
if(!infile)
{
if(r==1||r==3||r==4||r==5)
{
gotoxy(17,12);cout<<"FILE DOES NOT EXIST.CONTACT JANS PVT
LIMITED";
delay(8);if(r==3)transaction();else if(r==4)menu();else
searchdisplay();
}
if(r==2)q=0;
}
if(r==1||r==3||r==4||r==5)

Page | 19

{
gotoxy(28,8);cout<<"ENTER YOUR ACCOUNT NUMBER:";
column(1,0);gotoxy(33,11);cin>>n;
gotoxy(28,8);cout<<" ";
beat(40,11,99,3.22222222222222221,6);
}
if(r==2)
n=a;
while(infile.read((char *)&J,sizeof(J))&&q==0)
{
if(J.raccno()==n)
{
if(r==1||r==3||r==4||r==5)
J.searchindividual();
q=1;
}
}
if((r==1||r==3||r==4||r==5)&& q==0)
{
clearoff(9,65,2,22,0); gotoxy(25,11);cout<<" Account Number does
not exist";
gotoxy(35,12);cout<<"Please try again";press(2);
if(r==1||r==5)searchdisplay();if(r==3)transaction();if(r==4)menu();
}
if(r==1)
{
press(3);impress();
}
infile.close();
if(r==2)return q;
if(r==3||r==4||r==5)return n;
}

void bank::searchindividual()
{
gotoxy(29,6);cout<<"Account details";
gotoxy(31,7);cout<<"Name :"<<name;
gotoxy(31,8);cout<<"Account Number:"<<acc;
gotoxy(31,9);cout<<"Total Amount :"<<cash;
gotoxy(31,10);cout<<"Account Type :"<<type;
gotoxy(31,11);cout<<"Phone Number :"<<tele;
gotoxy(31,12);cout<<"Address :"<<address;
}
//------------------------------------------------------------------------//**************FUNCTION TO DISPLAY DEFAULT TEXT ON SCREEN****************
//------------------------------------------------------------------------void column(int m,int h)
{
if(m==1)
{
gotoxy(32,10);cout<<"|----------------|";
gotoxy(32,11);cout<<"$ $";
gotoxy(32,12);cout<<"|----------------|";
}

Page | 20

if(m==2)
{
gotoxy(24,19);cout<<"|---------|";
gotoxy(24,20);
if(h==1)cout<<"$ Accept $";
else if(h==2)cout<<"$ ENTER $";
else if(h==3)cout<<"$ DELETE $";
else if(h==4)cout<<"$ LOGIN $";
else if(h==5)cout<<"$ Yes $";
gotoxy(24,21);cout<<"|---------|";
gotoxy(44,19);cout<<"|----------|";
gotoxy(44,20);
if(h==1)cout<<"$ Decline $";
else if(h==2||h==3)cout<<"$ CANCEL $";
else if(h==4) cout<<"$ CLEAR $";
else if(h==5) cout<<"$ NO $";
gotoxy(44,21);cout<<"|----------|";
}
if(m==3){
gotoxy(6,21);
cout<<" <> or {
}
or -+ or TAB and space bar or WASD or IJKL keys to move";
}
}
//------------------------------------------------------------------------//**************
FUNCTION TO AWAIL LOAN
****************
//------------------------------------------------------------------------void iloan()
{
Nscreen(2);
float n,interest,m,rate;
gotoxy(27,8);cout<<"ENTER THE PRINCIPAL AMOUNT:";
column(1,2);gotoxy(33,11);cin>>n;
gotoxy(23,8);cout<<" ";
gotoxy(25,8);cout<<"ENTER THE TOTAL NUMBER OF MONTHS:";
column(1,2);gotoxy(33,11);cin>>m;
gotoxy(23,8);cout<<" ";column(2,2);
gotoxy(26,8);cout<<"ENTER THE INTEREST RATE(%):";
column(1,2);gotoxy(33,11);cin>>rate;
gotoxy(23,8);cout<<" ";
int g=keys3(0);
if(g==0)
{
beat(40,11,99,3.22222222222222221,6);clearoff(20,60,4,22,0);
interest=n*(m/12)*(rate/100);
gotoxy(29,6);cout<<"LOAN DETAILS";
gotoxy(31,7);cout<<"PRINCIPAL AMT :"<<"BD "<<n;
gotoxy(31,8);cout<<"RATE :"<<rate<<"%";
gotoxy(31,9);cout<<"LOAN PERIOD :"<<m<<" months";
gotoxy(31,10);cout<<"TOTAL INTEREST :"<<"BD "<<interest;
gotoxy(31,11);cout<<"TOTAL AMOUNT :"<<"BD "<<n+interest;press(3);
impress();
}
else if(g==1)

Page | 21

{
searchdisplay();
}
}
//------------------------------------------------------------------------//**************
FUNCTION TO DISPLAY ACCOUNT REPORT
****************
//------------------------------------------------------------------------void ireport()
{
beat(40,11,99,3.22222222222222221,6);;
clrscr();
int t=1;
bank K;
ifstream rep;
rep.open("bank.dat",ios::binary|ios::in);
if(!rep)
{
gotoxy(17,12);cout<<"FILE DOES NOT EXIST.CONTACT JANS PVT LIMITED";
delay(8);searchdisplay();
}
cout<<" Reportn";
cout<<" Total Number of Customers- "<<endl;
cout<<"=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=*=*=*=*=*=*";
cout<<"$ S/no. $ A/c no. $ NAME $ Type $ Balance $";
cout<<"=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=*=*=*=*=*=*";
while(rep.read((char*)&K,sizeof(K)))
{
K.report(t);
t++;
}
gotoxy(53,2);cout<<t-1;
rep.close();
press(3);searchdisplay();
}
void bank ::report(int t)
{
int l=strlen(name);
cout<<"$ "<<t<<setw(9)<<"$ "<<acc<<setw(9)<<"$ "<<name<<setw(34-l)<<" $
"<<type<<setw(7)<<"$ "<<cash<<endl;
cout<<"********************************************************************
************";
}
//------------------------------------------------------------------------//************** FUNCTION TO MODIFY ACCOUNT CREDENTIALS
****************
//-------------------------------------------------------------------------

void imodify()
{

Page | 22

Nscreen(6);
bank J;
fstream infile;
infile.open("bank.dat",ios::binary|ios::in|ios::out);
int n;
n=iuserdisplay(0,5);column(2,5);gotoxy(30,18);cout<<"DO YOU WISH TO
MODIFY?";
int g=keys3(0);if(g==1)searchdisplay();else if(g==0)
while(infile.read((char*)&J,sizeof(J)))
{
if(J.raccno()==n)
{
J.addaccount(2);
int pos=(-1)*sizeof(bank);
infile.seekp(pos,ios::cur);
infile.write((char*)&J,sizeof(bank));
}
}
infile.close();
loading(6);impress();searchdisplay();
}
int a=0;
void login()
{
Nscreen(7);
char un[50],pass[50],ch;int i=0;
logo(14,5,1,4);column(2,4);
gotoxy(26,14);
cout<<"USERNAME:";
gotoxy(26,17);
cout<<"PASSWORD:";
gotoxy(35,13);cout<<"|----------------|";gotoxy(35,14);cout<<"$ $";
gotoxy(35,15);cout<<"|----------------|";gotoxy(35,16);cout<<"|---------------|";
gotoxy(35,17);cout<<"$ $";gotoxy(35,18);cout<<"|----------------|";
gotoxy(36,14); gets(un);
do{
gotoxy(36,17);ch=getch();
if(ch==8)
{
if(i==0){
gotoxy(36+i,17);
}
else
{
pass[i-1]='';
gotoxy(35+i,17);cout<<" ";
gotoxy(36+i,17);i--;
}
}
else if(ch!=13)
{
gotoxy(36+i,17);
pass[i]=ch; int q=rand()%7;
irandom(0,q);
i++;

Page | 23

}
else break;
}
while(ch!=13);
gotoxy(22,17);
pass[i]='';
if(strcmp("jansuser",pass)==0&&strcmp("JANS",un)==0)
a+=1;
else
a--;
int g=keys3(0);if(g==0)verify();else if(g==1)screen();
}
void verify()
{
if(a==1) menu();
else while(a<0&&a>-3)
{
delay(7);clearoff(3,77,4,22,0);
gotoxy(18,10);cout<<"Invalid Username OR Password. Please try
Againn";
gotoxy(18,11);cout<<" You have "<<a+3<<"attempt(s) left";
delay(7);
press(2);clrscr();login();
if(a==1)menu();
else if(a==-3)
{
delay(7);clearoff(3,77,4,22,0);
gotoxy(18,10);cout<<" SORRY YOU CAN NO LONGER CONTINUEn";
delay(7);clrscr();logo(14,5,1,4);
exit(0);
}
}
}
//------------------------------------------------------------------------//**************** FUNCTIONS TO DISPLAY THE MENU SCREEN *******************
//------------------------------------------------------------------------void menu()
{
Jscreen(1);
logo(13,5,1,4);
menu_();
}
void menu_()
{
char A[20]={
' ','$',' ','M','A','I','N',' ',' ',' ','M','E','N','U'
}
;
for(i=3,j=0;i<0,j<14;i++,j++)
{
gotoxy(5,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}

Page | 24

gotoxy(13,14);cout<<" PLEASE SELECT AN OPTION ";


gotoxy(13,16);cout<<"$ TRANSACTIONS $ CREATE ACCOUNT";
gotoxy(13,18);cout<<"$ SEARCH & DISPLAY $ DELETE ACCOUNT";
column(3,0);gotoxy(13,22);cout<<" Press ESC to LOGOUT ";keys1();
}

//------------------------------------------------------------------------//******* FUNCTION WHICH ENABLES CURSOR MOVEMENT THROUGH KEYBOARD (I)******


//------------------------------------------------------------------------void keys1()
{
int ch,p=0; x:
if(p==0)
{
{
gotoxy(46,18);cout<<" ";
gotoxy(12,16);cout<<">"; logo(13,5,1,2.8);
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91){
p=1;
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=3;gotoxy(12,16);cout<<" ";
}
}
if(p==1)
{
{
gotoxy(12,16);cout<<" ";
gotoxy(46,16);cout<<">";logo(13,5,1,2.8);
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=2;
}
else if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=0;
gotoxy(46,16); cout<<" ";
}
}
if(p==2)
{
{
gotoxy(46,16);cout<<" ";
gotoxy(12,18);cout<<">"; logo(13,5,1,2.8);
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=3;

Page | 25

}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=1;
gotoxy(12,18);cout<<" ";
}
}
if(p==3)
{
{
gotoxy(12,18);cout<<" ";
gotoxy(46,18);cout<<">";logo(13,5,1,2.8);
}
ch=getch();
if(ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=0;
}
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=2;
gotoxy(46,18);cout<<" ";
}
}
if(ch==115||ch==83||ch==107||ch==75)
{
if( p==0)
{
p=2;
gotoxy(12,16);cout<<" ";
}
else if(p==1)
{
p=3;
gotoxy(46,16);cout<<" ";
}
}
if(ch==68||ch==100||ch==108||ch==76)
{
if( p==0)
{
p=1;
gotoxy(12,16);cout<<" ";
gotoxy(46,16);cout<<">";
}
else if(p==2)
{
p=3;
gotoxy(12,18);cout<<" ";
}
}
if(ch==97||ch==65||ch==106||ch==74)
{
if( p==1)
{
p=0;

Page | 26

gotoxy(46,16);cout<<" ";
}
else
if(p==3)
{
p=2;
gotoxy(46,18);cout<<" ";
}
}
if(ch==87||ch==119||ch==73||ch==105)
{
if( p==2)
{
p=0;
gotoxy(12,18);cout<<" ";
}
else if(p==3)
{
p=1;gotoxy(46,18);cout<<" ";
}
}
if(ch==13)
{
if(p==0)transaction();
if(p==1)iaddaccount();
if(p==2)searchdisplay();
if(p==3)ideleteaccount();
}
if(ch==27)
{
screen();
}
if(ch)
goto x;
}
//------------------------------------------------------------------------//*************** FUNCTION TO DISPLAY THE TRANSACTIONS MENU **************
//------------------------------------------------------------------------void transaction()
{
Jscreen(0);
char A[20]={
' ','$',' ','T','R','A','N','S','A','C','T','I','O','N','S'
}
;
for(i=3,j=0;i<0,j<15;i++,j++)
{
gotoxy(5,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
gotoxy(13,16);
cout<<"$ DEPOSIT $ WITHDRAW";
gotoxy(13,18);

Page | 27

cout<<"$ LOAN ";


column(3,0);gotoxy(13,22);cout<<" Press ESC to LOGOUT Press BACKSPACE
to go back";keys2(1);
}

//-----------------------------------------------------------------------//***** FUNCTION WHICH ENABLES CURSOR MOVEMENT THROUGH KEYBOARD (II)******


//-----------------------------------------------------------------------void keys2(int a)
{
int ch,p=0;
x:if(p==0)
{
{
gotoxy(12,18);
cout<<" ";
gotoxy(12,16);
cout<<">"; logo(13,5,1,2.8);
}
ch=getch();
if( ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=1;
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=2;
gotoxy(12,16);cout<<" ";
}
}
if(p==1)
{
{
gotoxy(12,16); cout<<" ";
gotoxy(55,16);cout<<">"; logo(13,5,1,2.8);
}
ch=getch();
if( ch==62||ch==46||ch==9||ch==45||ch==91)p=2;
else if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=0;
gotoxy(55,16);cout<<" ";
}
}
if(p==2)
{
{
gotoxy(55,16);cout<<" ";
gotoxy(12,18);cout<<">";logo(13,5,1,2.8);
}
ch=getch();
if( ch==62||ch==46||ch==9||ch==45||ch==91)
{
p=0;

Page | 28

gotoxy(55,7);cout<<" ";
gotoxy(12,16);cout<<">";
}
else
if(ch==60||ch==44||ch==32||ch==61||ch==93)
{
p=1;gotoxy(12,18);cout<<" ";
}
}
if(ch==115||ch==83||ch==107||ch==75)
{
if( p==0)
{
p=2;
gotoxy(12,16);cout<<" ";
}
else
if(p==1)
{
p=2;
gotoxy(46,16);cout<<" ";
}
}
if(ch==68||ch==100||ch==108||ch==76)
{
if( p==0)
{
p=1;
gotoxy(12,16);cout<<" ";
}
else
if(p==2)
{
p=1; gotoxy(12,18); cout<<" ";
}
}
if(ch==97||ch==65||ch==106||ch==74)
if( p==1)
{
p=0;
gotoxy(55,16);cout<<" ";
}
if(ch==87||ch==119||ch==73||ch==108)
{
if( p==2)
{
p=0;
gotoxy(12,18);cout<<" ";
}
}
if(ch==13)
{
if(a==1)
{
if(p==0)idepositwithdraw(1);
if(p==1)idepositwithdraw(2);
if(p==2)iloan();

Page | 29

}
if(a==2)
{
if(p==0)iuserdisplay(0,1);
if(p==1)ireport();
if(p==2)imodify();
}
}
if(ch==27){
screen();
}
if(ch==8){
clearoff(3,78,2,22,0);menu_();
}
if(ch)goto x;
}

//------------------------------------------------------------------------//************* FUNCTION TO DISPLAY THE SEARCH AND DISPLAY MENU *********


//-------------------------------------------------------------------------

void searchdisplay()
{
Jscreen(0);
char A[20]={
' ','$',' ','S','E','A','R','C','H',' ','&','
','D','I','S','P','L','A','Y'
}
;
for(i=3,j=0;i<0,j<19;i++,j++)
{
gotoxy(5,i);delay(6);cout<<A[j];
gotoxy(75,i);cout<<A[j];
}
gotoxy(13,16);
cout<<"$ USER DISPLAY $ REPORT";
gotoxy(13,18);
cout<<"$ MODIFY ";
gotoxy(6,21);
column(3,0);gotoxy(13,22);cout<<" Press ESC to LOGOUT Press BACKSPACE
to go back";
keys2(2);
}
//-----------------------------------------------------------------------//************************* FUNCTION TO DELETE AN ACCOUNT ****************
//------------------------------------------------------------------------

void ideleteaccount()
{
int n[10];
Nscreen(1);

Page | 30

bank L;
ifstream infile;
ofstream outfile;
infile.open("bank.dat",ios::binary);
if(!infile)
{
cout<<"File does not exist";
}
n[10]=iuserdisplay(0,4);
gotoxy(29,15);cout<<"ARE YOU SURE YOU WANT TO";
gotoxy(24,16);cout<<"Permanently delete your account";column(2,3);int
g=keys3(0);
if(g==1)
{
menu();
}
else if(g==0)
{
outfile.open("temp.dat",ios::binary);
infile.seekg(0,ios::beg);
while(infile.read((char*)&L,sizeof(bank)))
{
if(L.raccno()!=n[10])
{
outfile.write((char*)&L,sizeof(bank));
}
}
}
infile.close();
outfile.close();
remove("bank.dat");
rename("temp.dat","bank.dat");
loading(4);impress();menu();
}

//-----------------------------------------------------------------------//************* FUNCTION TO DEPOSIT TO OR WITHDRAW FROM AN ACCOUNT *******


//------------------------------------------------------------------------

void idepositwithdraw(int d)
{
int n;long int money;
if(d==1)Nscreen(3);
if(d==2)Nscreen(4);
bank G;
fstream file;
file.open("bank.dat",ios::binary|ios::in|ios::out);
n=iuserdisplay(0,3);column(2,2);
gotoxy(29,15);cout<<"ENTER THE AMOUNT";
gotoxy(32,16);cout<<"|----------------|";
gotoxy(32,17);cout<<"$ $";
gotoxy(32,18);cout<<"|----------------|";
gotoxy(33,17);cin>>money;
int w=keys3(0);
if(w==1)

Page | 31

transaction();
if(w==0)
while(file.read((char*)&G,sizeof(bank)))
{
if(G.raccno()==n)
{
if(d==1) G.deposit(money);
if(d==2)
{
int bal=G.rcash()-money;
if(bal<500&&G.rtype()=='S'||(bal<1000)&&G.rtype()=='C')
{
clearoff(9,65,2,22,0); gotoxy(25,11);cout<<" You do
not have enough balance";
gotoxy(31,12);cout<<"Please try a lower amount";
press(2);idepositwithdraw(2);
}
else G.withdraw(money);
}
int pos=(-1)*sizeof(bank);
file.seekp(pos,ios::cur);
file.write((char*)&G,sizeof(bank));
}
}
file.close();
clrscr();
if(d==1)loading(2);if(d==2)loading(3);
impress();
transaction();
}
void bank::deposit(long int money)
{
cash+=money;
}
void bank::withdraw(long int money)
{
cash-=money;
}

//-----------------------------------------------------------------------//********************** FUNCTION TO DISPLAY THE CAPTION *****************


//------------------------------------------------------------------------

void caption(int x,int y)


{
delay(7);
gotoxy(x+13,y+9);cout<<"W";delay(6);cout<<"h";delay(6);cout<<"e";delay(6);c
out<<"r";delay(6);cout<<"e";delay(6);cout<<"
";delay(6);cout<<"t";delay(6);cout<<"h";delay(6);cout<<"e";delay(6);cout<<"

Page | 32

";delay(6);cout<<"w";delay(6);cout<<"o";delay(6);cout<<"r";delay(6);cout<<"
l";delay(6);cout<<"d";delay(6);cout<<"
";delay(6);cout<<"c";delay(6);cout<<"o";delay(6);cout<<"m";delay(6);cout<<"
e";delay(6);cout<<"s";delay(6);cout<<"
";delay(6);cout<<"t";delay(6);cout<<"o";delay(6);cout<<"
";delay(6);cout<<"B";delay(6);cout<<"a";delay(6);cout<<"n";delay(6);cout<<"
k";delay(6);cout<<" ";gotoxy(22,18);
}
//-----------------------------------------------------------------------//**********************
THE DELAY FUNCTION
*****************
//------------------------------------------------------------------------

void delay(float q)
{
for(long int d=0;d<pow(10,q);d++);
}

//-----------------------------------------------------------------------//***************** FUNCTION TO DISPLAY A RANDOM SYMBOL ******************


//-----------------------------------------------------------------------int irandom(int v,int n)
{
if(v==1)
{
n=rand()%7;
}
if(n==0)cout<<"$";
if(n==1)cout<<"";
if(n==2)cout<<"";
if(n==3)cout<<"";
if(n==4)cout<<"?";
if(n==5)cout<<"V";
if(n==6)cout<<"";
}
//------------------------------------------------------------------------//******************** FUNCTION TO DISPLAY THE BORDER ******************
//-------------------------------------------------------------------------

void border2(int x,int y,int d, int f,float w)


{
int n=rand()%7;int q=rand()%5;
while(x<=d)
{
gotoxy(x,y);
irandom(0,q);
if(d==80)
gotoxy(d-x,f);
if(d==79)
gotoxy(d-x+2,f);

Page | 33

if(d==78)gotoxy(d-x+3,f-y+3);
irandom(0,n);
delay(w);
x++;
}
x--;
while(y<=f)
{
gotoxy(x,y);
irandom(0,n);
if(d==80)
gotoxy(d-x,f-y);
if(d==79)gotoxy(d-x+2,f-y+2);
if(d==78)gotoxy(d-x+3,f-y+3);
irandom(0,q);
delay(w);
y++;
}
y--;
}
//-----------------------------------------------------------------------//**************** FUNCTION TO DISPLAY THE BORDER AND BEATS **************
//-----------------------------------------------------------------------void Jscreen(int h)
{
if(h==1)beat(40,11,99,3.22222222222222221,6);clrscr();
border2(1,1,80,24,5);border2(2,2,79,23,5);
}

//------------------------------------------------------------------------//********** FUNCTION TO CLEAR A SPECIFIC PORTION OF THE SCREEN ***********


//-------------------------------------------------------------------------

void clearoff(int i,int n,int j,int k,float q)


{
for (;i<n;i++)
for(j=2;j<k;j++)//j=2 fix
{
gotoxy(i,j);
cout<<" ";
delay(q);
}
}

//-----------------------------------------------------------------------//********************** FUNCTION TO DISPLAY THE LOGO ********************


//-----------------------------------------------------------------------void logo(int x,int y,int noftim,float del)
{

Page | 34

int f=rand()%7;int q=rand()%7;int a=rand()%7; int b=rand()%7; int


c=rand()%7;
int A[250]={
0,1,0,0,1,2,3,2,1,0,1,0,1,2,4,5,2,1,0,0,1,2,3,6,7,4,3,2,1,0,1,2,4,5,8,9,6,5
,2,3,6,7,10,11,10,8,7,4,5,8,9,10,11,12,11,10,9,6,7,10,11,12,11,10,8,9,10,11
,16,12,11,10,11,12,16,17,18,17,16,18,17,16,16,17,18,22,23,22,18,17,16,16,17
,18,22,23,24,25,24,23,22,18,17,18,22,23,24,25,26,27,26,24,23,22,22,23,24,27
,28,29,28,24,23,22,23,24,29,30,31,30,24,25,31,32,33,32,29,25,26,33,34,35,34
,29,27,29,30,32,33,34,33,31,30,28,29,31,32,35,36,36,33,32,30,31,33,34,35,34
,32,34,35,36,35,34,33,34,35,36,36,35,36,42,43,42,42,43,44,44,43,42,42,43,44
,44,43,42,42,43,44,45,46,45,44,43,42,43,44,46,47,48,47,44,45,48,49,50,49,46
,47,50,51,52,51,48,49,52,53,50,51,53,54,53,52,53,54,55,55,54
}
;
int B[250]={
0,0,1,2,1,0,0,1,2,3,3,4,3,2,0,0,3,4,5,6,5,4,3,0,0,3,4,5,6,7,7,6,4,3,0,0,3,4
,7,7,4,3,0,0,1,3,4,7,7,4,3,2,1,1,2,3,4,7,7,4,3,2,4,5,7,7,6,5,0,5,6,7,7,6,1,
0,0,1,3,1,3,4,5,4,3,0,0,1,4,5,6,7,6,5,2,1,0,0,1,2,3,6,7,7,4,3,2,1,0,0,1,3,4
,5,6,5,4,1,0,0,1,5,6,7,7,6,1,0,0,1,7,7,1,0,0,1,4,7,7,1,0,0,1,4,7,5,4,1,0,0,
1,4,5,7,7,5,4,1,0,1,4,5,7,7,5,4,4,5,7,5,4,4,5,6,7,7,6,5,6,7,7,0,0,1,2,1,0,1
,2,3,4,3,2,3,4,5,6,5,4,3,3,4,5,6,7,7,6,4,3,3,4,7,7,4,3,3,4,7,7,4,3,3,4,7,7,
4,4,7,7,5,5,6,7,7,6,5,6,7
}
;
for( int z=0;z<noftim;z++)
{
for(int i=0;i<237;i++)
{
gotoxy(x+A[i],y+B[i]);irandom(0,f); delay(del);
}
for( i=237;i>-1;i--)
{
gotoxy(x+A[i],y+B[i]);irandom(0,a); delay(del);
}
for( i=0;i<237;i++)
{
gotoxy(x+A[i],y+B[i]);irandom(0,q); delay(del);
}
for(i=237;i>-1;i--)
{
gotoxy(x+A[i],y+B[i]);irandom(0,b); delay(del);
}
for(i=237;i>-1;i--)
{
gotoxy(x+A[i],y+B[i]);cout<<" "; delay(del);
}
for(i=0;i<237;i++)
{
gotoxy(x+A[i],y+B[i]);irandom(0,c); delay(del);
}
{
int n;
for( i=0;i<1000;i++)
{
n=rand()%237;

Page | 35

gotoxy(x+A[n],y+B[n]);cout<<" "; delay(del-0.5);


}
for(int i=0;i<237;i++)
{
gotoxy(x+A[i],y+B[i]);cout<<" "; delay(2);
}
}
{
int n;
for( i=0;i<1000;i++)
{
n=rand()%237;
gotoxy(x+A[n],y+B[n]);irandom(0,f); delay(del-0.5);
}
for( i=0;i<237;i++)
{
gotoxy(x+A[i],y+B[i]);irandom(0,c); delay(2);
}
}
}
}
//-----------------------------------------------------------------------//************ FUNCTION TO DISPLAY THE DELETE ACCOUNT SCREEN *************
//------------------------------------------------------------------------

void Nscreen(int l)
{
beat(40,11,99,3.22222222222222221,6);
clrscr();
for(i=0;i<3;i++)arrow(4);
border2(1,1,80,24,4.8);
if(l==1)
{
char A[20]={
'$',' ',' ',' ','D','E','L','E','T','E',' ','
','A','C','C','O','U','N','T'
}
;
for(i=2,j=0;i<21,j<19;i++,j++)
{
if(j==1||j==2||j==3||j==9||j==10||j==11)
continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
if(l==2)
{
char A[20]={
'$',' ',' ',' ','L',' ',' ',' ','O',' ',' ',' ','A',' ',' ','
','N'
}
;

Page | 36

for(i=2,j=0;i<16,j<17;i++,j++)
{
if(j==1||j==2||j==3||j==7||j==5||j==9||j==10||j==11)
continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
if(l==3)
{
char A[20]={
'$',' ',' ',' ','D',' ','E',' ','P',' ','O',' ','S',' ','I','
','T'
}
;
for(i=2,j=0;i<22,j<17;i++,j++)
{
if(j==1||j==3||j==5||j==11)
continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
if(l==4)
{
char A[20]={
'$',' ','W',' ','I',' ','T',' ','H',' ','D',' ','R',' ','A','
','W'
}
;
for(i=2,j=0;i<22,j<17;i++,j++)
{
if(j==1||j==3||j==5||j==11)
continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
if(l==5)
{
char A[20]={' ',' ',' ',' ','$',' ','U','S','E','R',' ','
','D','I','S','P','L','A','Y' };
for(i=2,j=0;i<22,j<19;i++,j++)
{
if(j==0||j==1||j==3||j==10||j==11)
continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}

Page | 37

}
if(l==6)
{
char A[25]={
'$',' ',' ',' ','M',' ',' ',' ','O',' ',' ',' ','D',' ',' ','
','I',' ',' ',' ','Y'
}
;
for(i=2,j=0;i<21,j<21;i++,j++)
{
if(j==1||j==2||j==3||j==7||j==5||j==9||j==10||j==11||j==17||
j==18||j==19)
continue;
gotoxy(6,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
if(l==7)
{
char A[20]={
'$',' ',' ','L',' ',' ','O',' ',' ','G',' ',' ','I',' ',' ','N'
}
;
for(i=3,j=0;i<0,j<16;i++,j++)
{
if(j==1||j==2||j==4||j==5||j==7||j==8||j==10||j==11||j==13||
j==14)continue;
gotoxy(7,i); delay(6);
cout<<A[j];
gotoxy(75,i);
cout<<A[j];
}
}
}
void arrow(int n)
{
int i,j,k;
for(i=0;i<n;i++)
{
for(j=0;j<i;j++)
{
cout<<" ";
}
for(k=0;k<i;k++)
{
cout<<"*";
}
cout<<endl;
}
for(i=0;i<n;i++)
{
for(j=0;j<n-i;j++)
{
cout<<" ";
}

Page | 38

for(k=0;k<n-i;k++)
{
cout<<"*";
}
cout<<endl;
}
}
//----------------------------------------------------------------------//************
FUNCTION TO DISPLAY THE LOADING SCREEN
************
//-----------------------------------------------------------------------

void loading(int h)
{
Jscreen(0);
gotoxy(17,18);
cout<<" ----------------------------------";
gotoxy(17,20);
cout<<" ----------------------------------";
gotoxy(17,19);
cout<<" || ||";
int t;for(j=23,t=0;j<57 ;j++,t++)
{
if(t==97)continue;
logo(12,5,1,3);
gotoxy(36,9);cout<<" ";
gotoxy(34,19);
if(h==1) cout<<"Loading "<<++t<<"%";
else if(h==2)cout<<"Depositing "<<++t<<"%";
else if(h==3)cout<<"Withdrawing"<<++t<<"%";
else if(h==4)cout<<"Deleting "<<++t<<"%";
else if(h==5)cout<<"Creating "<<++t<<"%";
else if(h==6)cout<<"Modifying "<<++t<<"%";t++;
gotoxy(j,19);cout<<"$";
}
delay(4);
}
void press(int l)
{
delay(7);
gotoxy(49,21);
if(l==1)cout<<"Press any key for Services";
if(l==2)cout<<"Press any key to retry";
if(l==3)cout<<"Press any key to go back";
getch();
}
//-----------------------------------------------------------------------//****************** FUNCTION TO DRAW A SPIRAL BORDER ********************
//------------------------------------------------------------------------

void border(int noft,float q)


{
int i,j,a=0,b=80,c=0,d=1;

Page | 39

int a1=79,a2=79,a3=0,b1=80,b2=1,b3=1,c1=1,c2=24,c3=23,d1=24,d2=25,d3=0;
for(int n=0;n<noft;n++)
{
for(i=a;i<b;i++)
for(j=c;j<d;j++)
{
gotoxy(i,j);cout<<"$";
delay(q);
}
a++;b--;c++;d++;
for(i=a1;i<b1;i++)
for(j=c1;j<d1;j++)
{
gotoxy(i,j);cout<<"*";
delay(q);
}
a1--;b1--;c1++;d1--;
for(i=a2;i>b2;i--)
for(j=c2;j<d2;j++)
{
gotoxy(i,j);cout<<"*";
delay(q);
}
a2--;b2++;c2--;d2--;
for(i=a3;i<b3;i++)
for(j=c3;j>d3;j--)
{
gotoxy(i,j);cout<<"$";
delay(q);
}
a3++;b3++;c3--;d3++;
}
}

//-----------------------------------------------------------------------//********************** FUNCTION TO DISPLAY BEATS ***********************


//------------------------------------------------------------------------

void beat(int x,int y,int size,float delay1,int nofbeats)


{
int i,j,k;
for(int p=1;p<nofbeats+1;p++)
{
for(k=0;k<size;k++)
{
for( i=0;i<100;i++)
for( j=0;j<100;j++)
{
if((i-x)*(i-x)+(j-y)*(j-y)==k)
{
gotoxy(i,j);cout<<"*"; delay(delay1);
}
}
}

Page | 40

for(k=size;k>-1;k--)
{
for(i=0;i<100;i++)
for(j=0;j<100;j++)
{
if((i-x)*(i-x)+(j-y)*(j-y)==k)
{
gotoxy(i,j);cout<<" "; delay(delay1);
}
}
}
if(p%2==0)
{
delay(6.5);
}
}
}

//-----------------------------------------------------------------------//********************* FUNCTION TO CALL THE MENU FUNCTION ****************


//------------------------------------------------------------------------void screen()
{
beat(40,11,99,3.22222222222222221,6);border(12,3.5);
beat(40,11,99,3.22222222222222221,6);clrscr();
beat(40,11,99,3.22222222222222221,6);
border2(1,1,80,24,4.5);
border2(2,2,79,23,4.5);
border2(3,3,78,22,4.5);
logo(12,5,1,4);
caption(12,9);
press(1);
loading(1);
login();
menu();//remove
}
void main()
{
screen();

Page | 41

Screenshots

Page | 42

Page | 43

You might also like