Professional Documents
Culture Documents
Banking On ATM Card Using C Language
Banking On ATM Card Using C Language
On ATM Card
1. INTRODUCTION
F M N College, Kollam – IDE Study Centre Page 1
Banking On ATM Card
1. INTRODUCTION
Database is a collection of information that is used for several
purposes and Database Management system is an application Software, that has
some specific programs to access the data’s in the database. Data bases help
the users to create a large amount of information’s and stored it in a file
system or in a memory chip, In normal cases clerks have a lot of works to record,
search, edit and the details of a Accounting at the Bank, it wastes a lot of times
and their may be errors in the data , Here we introduce the " Banking On ATM
Card ". By using this software we can overcome all most all such problems like
data redundancy, inconsistency. And it also helps to implement standards
Here we use Floppy disk or Memory Card in the case of ATM card for available
Banking transactions. They are used to store customer bank details. Here these projects we
are use three Data Base files. One is used to store bank details such as bank password,
fixed amount , interest rate . Yet another is used to store all customer details such as
customer name , age , sex , password , passport number and deposited amount .
Another one is ATM card support file it is used to store account number it is used to
automatic reading the account number.
F M N College, Kollam – IDE Study Centre Page 2
Banking On ATM Card
1.1 ABSTRACT
The Computerization of “Banking On ATM Card” is the main objective of the
project. By using this software package the time consumption and work burden
will be reduced immensely .
The software entitled as ‘Banking On ATM Card’ is used for storing
details of the Accounting in the Bank database . It is interactive and user – friendly
software developed using C language. The project is prepared to implement in
DOS/ Windows / 2000 / NT platforms.
The project helps to store and maintain all details of the Account details
in the database of the customer and reduce data redundancy , inconsistency, and
it also helps to implement standards . The project is divided into five modules.
1. Account
2. Display
3. Settings
4. Transaction
5. Exit
F M N College, Kollam – IDE Study Centre Page 3
Banking On ATM Card
2. SYSTEM STUDY
F M N College, Kollam – IDE Study Centre Page 4
Banking On ATM Card
SYSTEM STUDY
The system study is indented with the study of the existing system,
that is about the current Data base system, the working of the system , the
concerned modules, and requirements etc . It also deals with the benefits and
disadvantages of the system . We must thoroughly understand the old system
and determine how computers can best be used to make its operations more
effective.
Before development of any project can be pursued, a system study is
conducted to learn the details of the current business situation . Information
gathered through the study, forms the basis for creating alternative design
strategies. Management selects the strategy to pursue.
2.1 Existing System
The existing system is studied to know the extent of computerization
required. Therefore, a detailed analysis of the existing system should be
conducted. For this purpose , system should be broken down into various
subsystems and these subsystems were analyzed closely to identify the problem
areas.
As we studied the existing system, it was found that there was
multiple File Management system which gives the facility for accessing the Banking
details . In a File Management all works are done manually. The main problem of
the manual operation is, it is time consuming and error prone than the
computerized system. There exists wastage of data retrieval time as in the case of
F M N College, Kollam – IDE Study Centre Page 5
Banking On ATM Card
search and further processing. There was no efficient system to manipulate the
existing records.
The problem I observe in this area is that the user has to do all
the operations manually , by searching and analyzing large amount of data, a miss‐
spelled digit or character may create many hours of extra work and complicated
correction procedure. Necessary data validation checks are included to avoid mistakes
2.2 PROPOSED SYSTEM
The existing system leads to many errors like data redundancy, data
inconstancy, and also much more paper works that waste very valuable time and
money. We collect a lot of information from different current tools and it’s
advantages.
Keeping this in mind we decided to develop a software and named
as “Banking On ATM Card” which is very user‐friendly and helps to make
research a real chore. This computerization improves efficiency of office work, and
also helps to keep data too many years without damage and can be recollected as
and when needed without much time
The Proposed system solves problems related to data accessing
problems, because it help the user to add details of the customer to the bank
database easily ,improving data recovery speed, easy searching and also provide
editing of data’s in the database
F M N College, Kollam – IDE Study Centre Page 6
Banking On ATM Card
. SYSTEM SPECIFICATION
F M N College, Kollam – IDE Study Centre Page 7
Banking On ATM Card
Language – c
OS – DOS/ WINDOWS
3 . 2 HARDWARE REQUIREMENT
RAM -- 128 MB
HDD -- 20 GB
Printer -- Laser
UPS -- 0.5 KV
F M N College, Kollam – IDE Study Centre Page 8
Banking On ATM Card
4. SYSTEM ANALYSIS
F M N College, Kollam – IDE Study Centre Page 9
Banking On ATM Card
Feasibility Study
4 .1 Feasibility Analysis
The main objective of feasibility study is to test the technical,
social and economic feasibility of developing a system. This is done before
developing a system . This is done by investigating the existing system in the area
under investigation and generating ideas about the new system.
4.1.1 Economic and Technical Feasibility
The system must be evaluated from the technical view point
first. The assessment of this feasibility must be based on an outline design of the
system requirement in terms of input, output, programs, procedure and staff. Having
identified the outline of the system, the investigation must go on to suggest the
type of equipment, required method of developing the system, and the method of
running the system
This developing system must be justified by cost and benefit
criteria to ensure that effort is concentrated on project which will give best return
at the earliest . One of the factors which affect the development of a new system is
the cost it would require. Since the system is developed as a part of our study ,
there is no manual cost to be spent for the proposed system.
F M N College, Kollam – IDE Study Centre Page 10
Banking On ATM Card
4.1.2 Social and Behavioral Feasibility
Proposed project would be beneficial only if they can be turned into
information system that’ll meet the organization operating requirements. One of the
main problem faced during the development of a new system is getting acceptance
from user . Being a general purpose software there are no resistance from the users
because this will be more beneficial to the users
F M N College, Kollam – IDE Study Centre Page 11
Banking On ATM Card
5 . SYSTEM DESIGN
F M N College, Kollam – IDE Study Centre Page 12
Banking On ATM Card
SYSTEM DESIGN
The system phase is the life cycle phase in which the detailed design of the
selected system in the study phase is accomplished. The design phase the technical
specification is prepared for the performers of all allocated tasks. it also include the
constructions of the programmers and program tasks.
In the design phase the first step is to design the output in
details first and then to work back to the inputs. The input data bases have to be design
to meet the requirements of the proposed output. Then to the implementation
phase the system analyst has to be define the method of capturing data and the input
program and the format of the output its use by the users.
F M N College, Kollam – IDE Study Centre Page 13
Banking On ATM Card
User side Input
The inputs provided by user are
• Login Bank Password
• Customer Account number , Name, age , sex , address , passport number
• Customer Account number and Customer Password (On ATM Card)
• Customer widower and deposit Cash amounts
5.3 Interface Design
Interface design mainly focuses on the design of interfaces between
software modules , external entities and the user. The design of internal program
F M N College, Kollam – IDE Study Centre Page 14
Banking On ATM Card
interfaces, sometimes called inter‐modular interface design, is driven by the data
that must flow between modules and the characteristics of the programming
Language in which the software is to be implemented. External interface
design begins with an evaluation of each external entity represented in the DFD’s
of the analysis model. Both internal and external interface design must be coupled
with data validation and error handling algorithms within a module. Because side
effects propagate across program interfaces, it is essential to check all data flowing
from module to module to ensure that the data conform to bounds established
during requirements analysis. User interface design has as much to do with the
study of people as it does with technology issues. Who is the user? How does the
user learn to interact with a new computer‐based system ? So the system should be
developed in a user‐friendly manner.
5.4 Procedural Design
A procedural design reduces complexity , facilitates change ( a critical
aspect of software maintainability ), and results in easier implementation by
encouraging parallel development of different parts of a system. Software with
effective modularity is easier to develop because function may be
compartmentalized and interfaces are simplified. Software architecture embodies
modularity , that is, software is divided into separately named and addressable
components called modules, which are integrated to satisfy problem requirements.
Modularity is the single attribute of software that allows a program to be
intellectually manageable. Monolithic software ( i.e., a large program comprised of a
single module) cannot be easily grasped by reader. The Five important criteria that
enable us to evaluate a design method with respect to its ability to define an
effective procedural design are, as described below
F M N College, Kollam – IDE Study Centre Page 15
Banking On ATM Card
5.5 Modular Description
The administrator has the right to access the system. To get into the
system the administrator has to give the Bank password. If the Bank user password
given are incorrect the system displays a message to the user showing that the
given details are invalid. Otherwise it go ‘ Main Menu ’ bar. It will contain five stages
1. Account Menu
The Account menu is controlled by three stages. Open, edit and close the
customer account they are describe in following section.
1.1. Open Account
The Customer details such as Account number , name, sex , age ,
address , deposited amount are entered by pressing 1 from the Account
menu and these details are saved. The system prompts whether the user
wants to add more records . If Re type ‘1’ is pressed the user can add more
records .
Banking On ATM Card
If the user wants to Close the details of a particular record, then the
user has to enter the Account number of the Customer he/she wish to close
by pressing 3 from the main menu . The transaction of the particular account
customer is closed.
2. Display Menu
The user can see all the Bank balance , Customer details and about me , by
pressing 2 from the main menu
2.1 Bank Balance
If the user wants to search for a bank balance details based on
the Customer account number then by pressing 1 from the display menu .
The Software is also given all customer details and balance amount of them by
calculating deposited amount.
2.3 About me
If the user wants to know the details of a software developers then the
user has to enter the pressing 3 from the display menu which represents the
details report of software developers.
3. Settings
The user can see all the Bank balance , Customer details and about me , by
pressing 2 from the main menu
F M N College, Kollam – IDE Study Centre Page 17
Banking On ATM Card
3.1 Change Password
If the bank user wants to change the old password of bank by
pressing 1 from the settings menu . The Software is support all character
words to be changed as given new password.
3.3 Help
If the user wants to know the usage or route of a software then the user
want to enter the pressing 3 from the settings menu which represents the
details report of software developers.
4. Transaction
The user can see all the Add Deposited Amount, Freeze Account and Re‐
Audit , by pressing 2 from the main menu
4.1 Add Deposited Amount
If the user wants to add deposited cash to bank balance on the
Customer account number then by pressing 1 from the Transaction menu .
After that type customer account number and deposited amount.
4.2 Freeze Account
If the user wants to freeze any bank account on the Customer then by
pressing 2 from the Transaction menu . After that type customer account
number and if type ‘y’ the account will Freeze stage it block all money
transactions. Otherwise type ’n’ the account will Change to open stage.
4.3 Re‐Audit
F M N College, Kollam – IDE Study Centre Page 18
Banking On ATM Card
If the user wants to Re-Audit the all customer account .Then the user has
to enter the pressing 3 from the Transaction menu . It will increase all customer
account with their bank account interest amount.
F M N College, Kollam – IDE Study Centre Page 19
Banking On ATM Card
The ATM account software manufactured by automatic reading of account
number of customer ATM card. When the customer enters the correct password on it the
main menu will display by checking the bank account is open stage only.
1. Balance Enquiry
If the user wants to display the details of his record, then the user has to
enter 2 from the main menu which represents the record to be displayed . The details are
displayed to the user.
2. Settings
The user can see all the Change Password, Account view and about
me , by pressing 2 from the main menu
2.1 Change Password
If the user wants to search for a bank balance details based on
the Customer account number then by pressing 1 from the display menu .
The Software is also given all customer details and balance amount of them by
calculating deposited amount.
F M N College, Kollam – IDE Study Centre Page 20
Banking On ATM Card
3. Windrow Cash
The customer want to receive his amount by pressing 3 from the main menu
.The customer can easily receive his cash.
4. About me
If the user wants to know the details of a software developers then the
user has to enter the pressing 4 from the display menu which represents the
details report of software developers.
5. Exit
By pressing 5 the user can exit from the ATM card currently use. Automatically
re read the next ATM while we will be inserting in few second after or please use
the enter key.
F M N College, Kollam – IDE Study Centre Page 21
Banking On ATM Card
A data flow diagram , also known as “ Bubble Chart “ has the purpose of
clarifying system requirements and identifying major transactions that will become
programs in system design . A DFD consists of series of squares joined by lines. The
squares represent the data transformations and the lines represent data flows in the
system.
DFD Symbols
1. A rectangle defines a source (originator) or designation of system data.
2. An arrow identifies data flow i.e., data in motion. It is a pipeline through which
information flows?
F M N College, Kollam – IDE Study Centre Page 22
Banking On ATM Card
Administrator
F M N College, Kollam – IDE Study Centre Page 23
Banking On ATM Card
CONTEXT LEVEL DFD
F M N College, Kollam – IDE Study Centre Page 24
Banking On ATM Card
Open Account
F M N College, Kollam – IDE Study Centre Page 25
Banking On ATM Card
1.2 Edit Account
F M N College, Kollam – IDE Study Centre Page 26
Banking On ATM Card
1.3 Close Account
F M N College, Kollam – IDE Study Centre Page 27
Banking On ATM Card
2. Display Menu
Bank Balance
F M N College, Kollam – IDE Study Centre Page 28
Banking On ATM Card
2.2 Account view
F M N College, Kollam – IDE Study Centre Page 29
Banking On ATM Card
Settings
3.1 Change Password
F M N College, Kollam – IDE Study Centre Page 30
Banking On ATM Card
3.2 Change Interest Rate
F M N College, Kollam – IDE Study Centre Page 31
Banking On ATM Card
4 . Transaction Menu
4.1 Add Deposit
F M N College, Kollam – IDE Study Centre Page 32
Banking On ATM Card
4.2 Freeze Account
F M N College, Kollam – IDE Study Centre Page 33
Banking On ATM Card
4.3 Re Audit
F M N College, Kollam – IDE Study Centre Page 34
Banking On ATM Card
1. Balance Enquiry
F M N College, Kollam – IDE Study Centre Page 35
Banking On ATM Card
2. Settings
2.1 Change Password
F M N College, Kollam – IDE Study Centre Page 36
Banking On ATM Card
2.2 Account view
F M N College, Kollam – IDE Study Centre Page 37
Banking On ATM Card
3. Windrow Cash
F M N College, Kollam – IDE Study Centre Page 38
Banking On ATM Card
STRUCTURE CHART
1. Banking System
F M N College, Kollam – IDE Study Centre Page 39
Banking On ATM Card
2. Banking on ATM Card
F M N College, Kollam – IDE Study Centre Page 40
Banking On ATM Card
6. IMPLEMENTATION AND TESTING
F M N College, Kollam – IDE Study Centre Page 41
Banking On ATM Card
6.1 IMPLEMENTATION
The final and important phase in the system life cycle is the implementation of the
new system. The term implementation has different meaning , ranging, from the
conventions of the basic application to a complete replacement of the computer system.
The procedure however is virtually the same. Implementations include all those activities that
take place to convert from old system to new. The new system may be totally new
replacing an existing manual or automated system or it may be major modification to an
existing system. The method of implementation and time scale to be adopted is found
out initially. Next the systems are tested properly and at the same time the users are
trained with the new procedure. Proper implementation is essential to provide a reliable
system to meet organizational requirement. Successful implementation may not guarantee
improvement in the organization using the system, but it will prevent improper
installation. The implementation involves the following things
• Careful planning
The method of implementation and time scale to be adopted was found out
initially. Next the system is tested properly and at the same time users were trained in
the new procedure to manipulate the system
F M N College, Kollam – IDE Study Centre Page 42
Banking On ATM Card
F M N College, Kollam – IDE Study Centre Page 43
Banking On ATM Card
F M N College, Kollam – IDE Study Centre Page 44
Banking On ATM Card
F M N College, Kollam – IDE Study Centre Page 45
Banking On ATM Card
F M N College, Kollam – IDE Study Centre Page 46
Banking On ATM Card
F M N College, Kollam – IDE Study Centre Page 47
Banking On ATM Card
7. CONCLUSION
F M N College, Kollam – IDE Study Centre Page 48
Banking On ATM Card
CONCLUSION
This project ‘ Banking On ATM Card ‘ deals with the Member
addition process, Edit, delete, and search process for Customer details. This project
is successful in meeting the goals of this concern, where the manual system was
not at their full satisfaction. By computerizing the concern, the accuracy of the
data recording has been increased and the speed is also increased.
F M N College, Kollam – IDE Study Centre Page 49
Banking On ATM Card
APPENDIX
F M N College, Kollam – IDE Study Centre Page 50
Banking On ATM Card
Install file
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#include <string.h>
#include <alloc.h>
struct sbi
{
int n;
char pass[10];
float inter,fix;
}bank;
void titlebar()
{
setcolor(BLUE);
settextstyle(0,0,6);
outtextxy(30,30,"SBI");
setcolor(6);
settextstyle(0,0,2);
outtextxy(200,30,"State Bank Of India");
setcolor(7);
settextstyle(0,0,1);
outtextxy(230,50,"Chinakada Road ,Kerala , Kollam");
outtextxy(270,65,"Pin code : 691001");
line(100,100,500,100);
}
void show()
{
int x;
setcolor(BLUE);
for(x=300;x<=590;x++)
{
rectangle(300,420,x,445);
F M N College, Kollam – IDE Study Centre Page 51
Banking On ATM Card
sound(100);
delay(10);
nosound();
}
}
void main()
{
int gd=DETECT,gm;
FILE *stream;
initgraph(&gd,&gm," ");
clrscr();
cleardevice();
titlebar();
bank.n=1;
gotoxy(12,15);
printf("Enter Bank Interest Rate \t : ");
scanf("%s",&bank.inter);
gotoxy(12,17);
printf("Enter fixed Amount \t: ");
scanf("%f",&bank.fix);
gotoxy(12,19);
printf("Enter the Bank Password \t: ");
scanf("%s",&bank.pass);
F M N College, Kollam – IDE Study Centre Page 52
Banking On ATM Card
gotoxy(15,28);
setcolor(YELLOW);
rectangle(100,417,600,448);
printf("Saving . . .");
show();
}
exit(0);
getch();
}
////////// Mob : - 97 46 96 86 37
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#include <string.h>
#include <alloc.h>
void closewin();
void show2();
void check();
void settings();
void tran();
void form1();
F M N College, Kollam – IDE Study Centre Page 53
Banking On ATM Card
void vochers();
void display();
void about();
void export();
void modacc();
void adddepo();
void close();
void bankdisplay();
void main();
void help();
int sd,sm,sy;
struct sbi
{
int n;
char pass[10];
float inter,fix;
}bank;
struct atm
{
float accno;
char name[30];
int age,sd,sm,sy;
char sex[5];
char stat[10];
}card;
struct acc
{
float accno;
char name[30],accpass[25],address[101],city[25];
float fix,ppno,balance;
char stat[5];
}account;
void tinreat(int x,int y,int p,int q,int t)
F M N College, Kollam – IDE Study Centre Page 54
Banking On ATM Card
{
int i;
setcolor(RED);
for(i=1;i<=t;i++)
{
rectangle(p,q,x+i,y+i);
delay(100);
}
}
void titlebar()
{
setcolor(BLUE);
settextstyle(0,0,6);
outtextxy(30,30,"SBI");
setcolor(6);
settextstyle(0,0,2);
outtextxy(200,30,"State Bank Of India");
setcolor(7);
settextstyle(0,0,1);
outtextxy(230,50,"Chinakada Road ,Kerala , Kollam");
outtextxy(270,65,"Pin code : 691001");
line(100,100,500,100);
}
void show1()
{
int i,j;
setcolor(2);
for(i=10;i<=450;i=i+5)
{
circle(10,i,5);
circle(620,i,5);
delay(10);
}
for(i=10;i<=620;i=i+5)
{
circle(i,10,5);
circle(i,450,5);
F M N College, Kollam – IDE Study Centre Page 55
Banking On ATM Card
delay(10);
}
show2();
}
void show2()
{
int i,j;
setcolor(7);
settextstyle(0,0,6);
for (i=250;i>=30;i‐‐)
{
setcolor(BLUE);
outtextxy(i,i,"SBI");
setcolor(BLACK);
outtextxy(i,i,"SBI");
delay(5);
}
setcolor(BLUE);
outtextxy(i,i,"SBI");
setcolor(6);
settextstyle(0,0,2);
outtextxy(200,30,"State Bank Of India");
setcolor(7);
settextstyle(0,0,1);
outtextxy(230,50,"Chinakada Road ,Kerala , Kollam");
outtextxy(270,65,"Pin code : 691001");
for(i=0;i<=400;i++)
{
line(100,100,100+i,100);
delay(10);
}
}
void help()
{
int i,j;
clrscr();
cleardevice();
titlebar();
F M N College, Kollam – IDE Study Centre Page 56
Banking On ATM Card
for(i=1;i<10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(80,150,"Help Menu");
gotoxy(10,12);
printf("\tThis a very GUI freindly Banking Accounting Software.Follwing are key cases used to data insert
and modifys");
printf("\n\n1.Account\n\n\tCreate,edit,close an Account are contain this property ");
printf("\n2.Display\n\n\tBank Balance,Account Information,About Me as are contain this property ");
printf("\n3.Settings\n\n\tChage Password,Change Interest Rate as on Bank property ");
printf("\n4.Transaction\n\n\t Add Deposite,Re Audit an Accounts amount contain this property ");
printf("\n5.Exit.\n\n\tThis contain exit SBI Account property or Quit the software. ");
delay(800);
nosound();
}
settings();
}
void addform()
{
int n,i,age,sd,sm,sy;
char name[30],c[4],address[100],stat[5],sex[5],city[25],pass[25];
float fix,balance,ppno;
struct date d;
FILE *stream;
getdate(&d);
sd = d.da_day ;
sm = d.da_mon ;
sy = d.da_year ;
n=bank.n;
clrscr();
cleardevice();
titlebar();
setcolor(YELLOW);
rectangle(50,150,600,450);
line(50,200,600,200);
line(50,230,600,230);
line(50,260,600,260);
F M N College, Kollam – IDE Study Centre Page 57
Banking On ATM Card
line(50,290,600,290);
line(50,325,600,325);
line(50,370,600,370);
gotoxy(9,12);
printf("Account Number :");
printf("%d",n+1000);
gotoxy(40,12);
printf("Opening Date :");
printf("%d‐%d‐%d",sd,sm,sy);
gotoxy(9,14);
printf("Account Name :");
scanf("%s",&name);
gotoxy(9,16);
printf("Age :");
scanf("%d",&age);
gotoxy(40,16);
printf("Sex (Male/Female) :");
scanf("%s",&sex);
gotoxy(9,18);
printf("Adress :");
scanf("%s",&address);
gotoxy(9,20);
printf("City :");
scanf("%s",city);
gotoxy(40,20);
printf("\7Account Password :");
scanf("%s",pass);
gotoxy(9,22);
printf("Depocite Amount :");
scanf("%f",&balance);
if(balance<bank.fix)
{
gotoxy(9,30);
printf("Fixed Amount is Low.Minimum Amount is %f",bank.fix);
}
gotoxy(40,22);
printf("Passport Number :");
scanf("%f",&ppno);
gotoxy(9,25);
F M N College, Kollam – IDE Study Centre Page 58
Banking On ATM Card
printf("Do you Want to Save This Account (y/n) :");
scanf("%s",&c);
if((strcmp(c,"y")==0)||(strcmp(c,"Y")==0))
{
line(50,410,600,410);
gotoxy(9,28);
printf("Saving . . .");
setcolor(BLUE);
card.accno=n+1000;
account.accno=n+1000;
strcpy(card.name,name);
card.age=age;
strcpy(card.sex,sex);
strcpy(account.address,address);
strcpy(account.city,city);
strcpy(card.stat,"Open");
account.ppno=ppno;
card.sd=sd;
card.sm=sm;
card.sy=sy;
account.accno=n+1000;
strcpy(account.name,name);
strcpy(account.accpass,pass);
account.fix=bank.fix;
account.balance=balance;
strcpy(account.stat,"Open");
export();
stream=fopen("sbiacc.sbi","a+b");
fwrite((char*)&account,1,sizeof(account),stream);
fclose(stream);
bank.n=n+1;
for(i=300;i<=590;i++)
{
rectangle(300,420,i,440);
delay(10);
}
clrscr();
F M N College, Kollam – IDE Study Centre Page 59
Banking On ATM Card
cleardevice();
titlebar();
vochers();
}
else
{
clrscr();
cleardevice();
titlebar();
vochers();
}
}
void accview()
{
float no;
int n,i,fact;
float balance;
FILE *stream;
clrscr();
cleardevice();
titlebar();
stream=fopen("Sbiacc.sbi","r+b");
gotoxy(25,15);
printf("Enter Account Number : ");
scanf("%f",&no);
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if(account.accno==no)
{
fact=1;
break;
}
else
{
fact=0;
}
F M N College, Kollam – IDE Study Centre Page 60
Banking On ATM Card
}
if(fact==1)
{
clrscr();
cleardevice();
titlebar();
setcolor(YELLOW);
rectangle(50,150,600,450);
gotoxy(9,14);
printf("Acount Number :%f",account.accno);
gotoxy(9,16);
printf("Account Name :%s",account.name);
gotoxy(9,18);
printf("Account Standard :%s",account.stat);
gotoxy(9,20);
printf("Passport Number :%f",account.ppno);
gotoxy(9,22);
printf("Address :%s",account.address);
gotoxy(9,24);
printf("City :%s",account.city);
gotoxy(9,26);
printf("Balance Amount :%f",account.balance);
delay(1000);
for(i=0;i<=10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(80,170,"Account View");
delay(300);
nosound();
}
fclose(stream);
clrscr();
cleardevice();
titlebar();
display();
}
else
F M N College, Kollam – IDE Study Centre Page 61
Banking On ATM Card
{
clrscr();
cleardevice();
gotoxy(25,25);
titlebar();
setcolor(RED);
settextstyle(1,0,1);
outtextxy(400,250,"Account Number Wrong");
adddepo();
}
}
void display()
{
int i;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf("Menu Bar ‐ Display");
gotoxy(25,13);
printf(" 1 . Bank Balance");
gotoxy(25,15);
printf(" 2 . Account View");
gotoxy(25,17);
printf(" 3 . About Me");
gotoxy(25,19);
printf(" 4 . Go Back");
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
gotoxy(23,23);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
F M N College, Kollam – IDE Study Centre Page 62
Banking On ATM Card
bankdisplay();
break;
case 2:
accview();
break;
case 3:
about();
break;
case 4:
clrscr();
cleardevice();
titlebar();
form1();
break;
default:
gotoxy(25,25);
printf("\7Wrong Decision");
delay(300);
display();
break;
};
}
void bankdisplay()
{
int i=1,n;
float a=0;
FILE *stream;
clrscr();
cleardevice();
stream=fopen("Sbiacc.sbi","r+b");
titlebar();
gotoxy(1,12);
printf("Sl No\t Account No \t\t Customer Name \t\t\t Balance");
printf("\n\n‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐");
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
printf("\n%2d \t%f %20s \t\t %10f ",i,account.accno,account.name,account.balance);
F M N College, Kollam – IDE Study Centre Page 63
Banking On ATM Card
a=a+account.balance;
}
fclose(stream);
printf("\n\n‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐");
printf("\n\t\t\t\t Bank Balance : %f",a);
printf("\n\n‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐");
delay(7000);
form1();
}
void adddepo()
{
float no;
int n,i,fact,ca;
float balance;
FILE *stream;
clrscr();
cleardevice();
titlebar();
stream=fopen("Sbiacc.sbi","r+b");
gotoxy(25,15);
printf("Enter Account Number : ");
scanf("%f",&no);
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if((account.accno==no)&&(strcmp(account.stat,"Open")==0))
{
fact=1;
ca=i;
break;
}
else
fact=0;
}
if(fact==1)
{
clrscr();
cleardevice();
F M N College, Kollam – IDE Study Centre Page 64
Banking On ATM Card
titlebar();
setcolor(YELLOW);
rectangle(50,150,600,350);
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
gotoxy(9,14);
printf("Acount Number :%f",account.accno);
gotoxy(9,16);
printf("Account Name :%s",account.name);
gotoxy(9,18);
printf("Deposited Amount :");
scanf("%f",&balance);
account.balance=account.balance+balance;
fwrite((char*)&account, sizeof(account), 1, stream);
fclose(stream);
clrscr();
cleardevice();
titlebar();
vochers();
}
else
{
clrscr();
cleardevice();
gotoxy(25,25);
titlebar();
setcolor(RED);
settextstyle(1,0,2);
outtextxy(400,150,"Account Number Wrong , Freeze or Close Account Number");
adddepo();
}
}
void vochers()
{
int i;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf("Menu Bar ‐ Account");
F M N College, Kollam – IDE Study Centre Page 65
Banking On ATM Card
gotoxy(25,13);
printf(" 1 . Open Account");
gotoxy(25,15);
printf(" 2 . Edit Account");
gotoxy(25,17);
printf(" 3 . Close Account");
gotoxy(25,19);
printf(" 4 . Go Back");
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
gotoxy(23,23);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
addform();
break;
case 2:
modacc();
break;
case 3:
closewin();
break;
case 4:
clrscr();
cleardevice();
titlebar();
form1();
break;
default:
gotoxy(25,25);
printf("Wrong Decision");
delay(100);
clrscr();
cleardevice();
F M N College, Kollam – IDE Study Centre Page 66
Banking On ATM Card
titlebar();
vochers();
break;
};
}
void modacc()
{
float no;
int i=1,fact=0,ca,tsize;
char name[30],address[100],city[25];
FILE *stream;
clrscr();
cleardevice();
titlebar();
stream=fopen("Sbiacc.sbi","r+b");
gotoxy(25,15);
printf("Enter Account Number : ");
scanf("%f",&no);
tsize=filelength(fileno(stream))/sizeof(account);
for(i=1;i<=tsize;i++)
{
fread(&account,sizeof(account),1,stream);
if(account.accno==no)
{
ca=i;
fact=1;
break;
}
}
if(fact==1)
{
clrscr();
cleardevice();
titlebar();
setcolor(YELLOW);
rectangle(50,150,600,450);
gotoxy(9,12);
printf("Edit Menu ");
F M N College, Kollam – IDE Study Centre Page 67
Banking On ATM Card
gotoxy(9,14);
printf("============================");
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
gotoxy(9,16);
printf("\7Account number : %f",account.accno);
gotoxy(9,18);
printf("Account name : %s",account.name);
gotoxy(9,20);
printf("Adress : ");
scanf("%s",&address);
gotoxy(9,22);
printf("City : ");
scanf("%s",city);
strcpy(account.address,address);
strcpy(account.city,city);
fwrite((char*)&account,1,sizeof(account),stream);
fclose(stream);
vochers();
}
else
{
clrscr();
cleardevice();
gotoxy(25,25);
titlebar();
setcolor(RED);
settextstyle(1,0,1);
outtextxy(400,250,"Account Number Wrong");
printf("\7");
delay(300);
vochers();
}
}
void freezeacc()
{
int i,n,ca,fact=0;
float fre;
F M N College, Kollam – IDE Study Centre Page 68
Banking On ATM Card
char c[5];
FILE *stream;
clrscr();
cleardevice();
titlebar();
gotoxy(25,20);
stream=fopen("Sbiacc.sbi","r+b");
printf("Enter the Account Number :");
scanf("%f",&fre);
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if(account.accno==fre)
{
fact=1;
ca=i;
break;
}
}
if(fact==1)
{
clrscr();
titlebar();
gotoxy(9,14);
printf("Account Number :%f",account.accno);
gotoxy(9,16);
printf("Account Name :%s",account.name);
gotoxy(9,18);
printf("You Want to Freeze this Account (y/n) :");
scanf("%s",&c);
if(strcmp(c,"y")==0)
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
strcpy(account.stat,"Freeze");
fwrite((char*)&account, sizeof(account), 1, stream);
fclose(stream);
tran();
}
F M N College, Kollam – IDE Study Centre Page 69
Banking On ATM Card
else
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
strcpy(account.stat,"Open");
fwrite((char*)&account, sizeof(account), 1, stream);
fclose(stream);
tran();
}
}
else
{
clrscr();
cleardevice();
titlebar();
outtextxy(400,250,"Wrong Account Number");
delay(500);
tran();
}
tran();
}
void closewin()
{
int i,n,ca,fact=0;
float fre;
char c[5];
FILE *stream;
clrscr();
cleardevice();
titlebar();
gotoxy(25,20);
stream=fopen("Sbiacc.sbi","r+b");
printf("Enter the Account Number :");
scanf("%f",&fre);
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if(account.accno==fre)
{
F M N College, Kollam – IDE Study Centre Page 70
Banking On ATM Card
fact=1;
ca=i;
break;
}
}
if(fact==1)
{
clrscr();
titlebar();
gotoxy(9,14);
printf("Account Number :%f",account.accno);
gotoxy(9,16);
printf("Account Name :%s",account.name);
gotoxy(9,18);
printf("You Want to Close this Account (y/n) :");
scanf("%s",&c);
if(strcmp(c,"y")==0)
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
strcpy(account.stat,"Close");
fwrite((char*)&account, sizeof(account), 1, stream);
fclose(stream);
tran();
}
else
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
strcpy(account.stat,"Open");
fwrite((char*)&account, sizeof(account), 1, stream);
fclose(stream);
tran();
}
}
else
{
clrscr();
cleardevice();
titlebar();
F M N College, Kollam – IDE Study Centre Page 71
Banking On ATM Card
outtextxy(400,250,"Wrong Account Number");
delay(500);
tran();
}
tran();
}
void tran()
{
int i,j,n,sd,sm,sy,tsize;
char name[30],stat[5],accpass[25],address[101],city[25];
double ppno;
float fix,balance,accno,no;
struct date d;
FILE *stream;
getdate(&d);
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf(" Menu Bar‐Transaction");
gotoxy(25,13);
printf(" 1 . Add Deposited Amount");
gotoxy(25,15);
printf(" 2 . Freeze Accounts");
gotoxy(25,17);
printf(" 3 . Re Audit");
gotoxy(25,19);
printf(" 4 . Go Back");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
F M N College, Kollam – IDE Study Centre Page 72
Banking On ATM Card
adddepo();
break;
case 2:
freezeacc();
break;
case 3:
clrscr();
cleardevice();
titlebar();
sd = d.da_day ;
sm = d.da_mon ;
sy = d.da_year ;
stream=fopen("Sbiacc.sbi","r+b");
gotoxy(5,10);
printf("\7\n\nInterest Rate : %f Percentage ",bank.inter);
printf("\tCurrent Date : %d‐%d‐%d",sd,sm,sy);
printf("\n\n\n\7Sl \t Account \t Account \t Amount \t Total");
printf("\nno \t Number \t Name \t \t rate");
printf("\n‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐");
n=bank.n;
for(i=0;i<n‐1;i++)
{
fseek(stream,(long)((i)*sizeof(account)),0);
fread(&account,sizeof(account),1,stream);
printf("\n %d \t %f %s \t %f \t %f
\t%f",i+1,account.accno,account.name,account.balance,account.balance*(bank.inter/100),(account.bala
nce)+(account.balance*(bank.inter/100)));
account.balance=(account.balance)+(account.balance*(bank.inter/100));
fseek(stream,(long)((i)*sizeof(account)),0);
fwrite((char*)&account,1,sizeof(account),stream);
delay(300);
}
printf("\n\n\t\t\t\t\t\t End Of Re‐Audit . . .");
fclose(stream);
delay(5000);
tran();
break;
case 4:
form1();
F M N College, Kollam – IDE Study Centre Page 73
Banking On ATM Card
break;
default:
gotoxy(25,25);
printf("\7Wrong Decision");
delay(300);
tran();
break;
};
}
void settings()
{
int i,n,sd,sm,sy;
char new1[10],old[10],new2[10];
struct date d;
FILE *stream;
getdate(&d);
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf("Menu Bar‐Settings");
gotoxy(25,13);
printf(" 1 . Change Password");
gotoxy(25,15);
printf(" 2 . Change interest");
gotoxy(25,17);
printf(" 3 . Help");
gotoxy(25,19);
printf(" 4 . Go Back");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
F M N College, Kollam – IDE Study Centre Page 74
Banking On ATM Card
{
case 1:
clrscr();
cleardevice();
titlebar();
gotoxy(10,10);
printf("Enter Old Password :");
scanf("%s",&old);
gotoxy(10,12);
printf("Enter New Password :");
scanf("%s",&new1);
gotoxy(10,14);
printf("Conform Password :");
scanf("%s",&new2);
if((strcmp(bank.pass,old)==0)&&strcmp(new1,new2)==0)
{
strcpy(bank.pass,new2);
setcolor(RED);
settextstyle(1,0,1);
outtextxy(400,250,"Password Changed");
delay(600);
clrscr();
cleardevice();
titlebar();
settings();
}
else
{
setcolor(RED);
settextstyle(1,0,3);
outtextxy(400,250,"Password Wrong");
delay(700);
clrscr();
cleardevice();
titlebar();
settings();
}
break;
case 2:
F M N College, Kollam – IDE Study Centre Page 75
Banking On ATM Card
clrscr();
cleardevice();
titlebar();
gotoxy(10,12);
printf("Old Interest Rate : %f",bank.inter);
gotoxy(10,14);
printf("Enter new Interest Rate : ");
scanf("%f",&bank.inter);
settings();
break;
case 3:
help();
break;
case 4:
clrscr();
cleardevice();
titlebar();
form1();
break;
default:
gotoxy(25,25);
printf("Wrong Decision");
delay(100);
clrscr();
cleardevice();
titlebar();
settings();
break;
};
}
void export()
{
FILE *stream;
if ((stream = fopen("A:\Sbi.sbi", "w+")) == NULL)
{ clrscr();
cleardevice();
titlebar();
gotoxy(16,15);
F M N College, Kollam – IDE Study Centre Page 76
Banking On ATM Card
printf("\7Cannot Write ATM Card files .");
delay(100);
}
else
fwrite(&card, sizeof(card), 1, stream);
fclose(stream);
}
void about()
{
int i,j;
clrscr();
cleardevice();
setbkcolor(BLACK);
setcolor(4);
circle(40,70,30);
circle(130,70,30);
circle(100,130,60);
circle(150,250,100);
circle(70,220,25);
circle(230,200,25);
circle(80,320,30);
circle(240,320,30);
circle(65,115,5);
circle(120,110,5);
circle(110,150,10);
for((int) i=1;i<=10;i++)
{
setcolor(i);
sound(100);
outtextxy(300,200,"Product By :");
outtextxy(300,220," Name : Vinu David .A");
outtextxy(300,240," Reg No : 6209");
outtextxy(300,260," College : F M N C Kollam");
delay(300);
nosound();
}
form1();
F M N College, Kollam – IDE Study Centre Page 77
Banking On ATM Card
}
void saveexit()
{
FILE *stream;
clrscr();
cleardevice();
titlebar();
if ((stream = fopen("Sbi.sbi", "wb")) == NULL)
{ clrscr();
cleardevice();
titlebar();
gotoxy(16,15);
printf("Cannot Write output file.");
delay(200);
}
else
{
fwrite(&bank, sizeof(bank), 1, stream);
fclose(stream);
}
exit(0);
}
void form1()
{
int i;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf(" Menu Bar");
gotoxy(25,13);
printf(" 1 . Account");
gotoxy(25,15);
printf(" 2 . Display");
gotoxy(25,17);
printf(" 3 . Settings");
F M N College, Kollam – IDE Study Centre Page 78
Banking On ATM Card
gotoxy(25,19);
printf(" 4 . Transaction");
gotoxy(25,21);
printf(" 5 . Save And Exit");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
vochers();
break;
case 2:
display();
break;
case 3:
settings();
break;
case 4:
tran();
break;
case 5:
saveexit();
break;
default:
gotoxy(25,25);
printf("Wrong Decision");
delay(100);
clrscr();
cleardevice();
titlebar();
form1();
break;
F M N College, Kollam – IDE Study Centre Page 79
Banking On ATM Card
};
}
void password()
{
char pas[25];
gotoxy(25,15);
printf("Enter the Password : ");
gets(pas);
if(strcmp(pas,bank.pass)==0)
{
gotoxy(25,15);
clrscr();
cleardevice();
show2();
form1();
}
else
{
clrscr();
cleardevice();
gotoxy(25,25);
titlebar();
setcolor(RED);
settextstyle(1,0,3);
outtextxy(400,250,"Password Wrong");
password();
}
}
void main()
{
int gd=DETECT,gm;
FILE *stream;
clrscr();
initgraph(&gd,&gm,"c:\\borlandc\\bgi");
if((stream=fopen("Sbi.sbi","rb"))==NULL)
{
gotoxy(25,25);
F M N College, Kollam – IDE Study Centre Page 80
Banking On ATM Card
printf("Mising Files . . .");
delay(500);
exit(0);
}
fread(&bank,sizeof(bank),1,stream);
fclose(stream);
show1();
password();
getch();
}
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#include <string.h>
void check();
void password();
void check();
void main();
void accview();
void chpass();
F M N College, Kollam – IDE Study Centre Page 81
Banking On ATM Card
struct sbi
{
int n;
char pass[10];
float inter,fix;
}bank;
struct atm
{
float accno,ppno;
char name[30];
int age,sd,sm,sy;
char sex[5];
char stat[10];
}card;
struct acc
{
float accno;
char name[30],accpass[25],address[101],city[25];
float fix,ppno,balance;
char stat[5];
}account;
void titlebar()
{
setcolor(BLUE);
settextstyle(0,0,6);
outtextxy(30,30,"SBI");
setcolor(6);
settextstyle(0,0,2);
outtextxy(200,30,"State Bank Of India");
setcolor(7);
settextstyle(0,0,1);
outtextxy(230,50,"Chinakada Road ,Kerala , Kollam");
outtextxy(270,65,"Pin code : 691001");
line(100,100,500,100);
}
void file()
{
FILE *stream;
F M N College, Kollam – IDE Study Centre Page 82
Banking On ATM Card
int n,i,j;
gotoxy(20,30);
printf("Pleace Insert the ATM Card");
if((stream=fopen("Sbi.sbi","a+b"))==NULL)
{
gotoxy(20,30);
fprintf(stderr,"File Missing");
}
else
{
fread(&bank,sizeof(bank),1,stream);
if((stream=fopen("A:\Sbi.sbi","a+b"))==NULL)
{
gotoxy(20,30);
printf("\tPleace Insert ATM Card . . .");
}
else
{
fread(&card,sizeof(card),1,stream);
if((stream=fopen("Sbiacc.sbi","a+b"))==NULL)
{
gotoxy(20,30);
printf("File Missing");
}
else
{
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if((account.accno==card.accno)&&(strcmp(account.stat,"Open")==0))
{
password();
break;
}
}
}
}
fclose(stream);
F M N College, Kollam – IDE Study Centre Page 83
Banking On ATM Card
}
}
void password()
{
char pass[25];
clrscr();
cleardevice();
titlebar();
gotoxy(20,15);
printf("Account Number :%f",account.accno);
gotoxy(20,18);
printf("Enter the Password :");
scanf("%s",&pass);
if(strcmp(account.accpass,pass)==0)
check();
else
{
setcolor(RED);
settextstyle(1,0,1);
outtextxy(400,250,"Password Wrong");
printf("\7");
delay(300);
main();
}
}
void balance()
{
int i;
clrscr();
cleardevice();
titlebar();
clrscr();
cleardevice();
titlebar();
setcolor(YELLOW);
rectangle(50,150,600,450);
delay(300);
F M N College, Kollam – IDE Study Centre Page 84
Banking On ATM Card
gotoxy(9,14);
printf("\7Acount Number :%f",account.accno);
gotoxy(9,16);
printf("Account Name :%s",account.name);
gotoxy(9,18);
printf("Balance Amount :%f",account.balance);
gotoxy(9,20);
printf("Receivable Amount :%f",account.balance‐bank.fix);
delay(500);
for(i=0;i<=10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(55,170,"Balance View");
delay(400);
nosound();
}
check();
}
void settings()
{ int i;
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf(" \7Menu Bar ‐ Settings");
gotoxy(25,13);
printf(" 1 . Change Password");
gotoxy(25,15);
printf(" 2 . Account View");
gotoxy(25,17);
printf(" 3 . Go Back");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
F M N College, Kollam – IDE Study Centre Page 85
Banking On ATM Card
line(175,340,375,340);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
chpass();
break;
case 2:
accview();
break;
case 3:
check();
break;
default:
gotoxy(25,25);
printf("\7Wrong Decision");
delay(300);
check();
break;
};
}
void accview()
{
int i;
clrscr();
cleardevice();
titlebar();
gotoxy(5,14);
printf("Account Number :%f",account.accno);
gotoxy(40,14);
printf("Account Open Date :%d‐%d‐%d",card.sd,card.sm,card.sy);
gotoxy(5,16);
printf("Account Name :%s",account.name);
gotoxy(5,18);
printf("Passport Number :%f",account.ppno);
gotoxy(5,20);
printf("Address :%s",account.address);
gotoxy(5,22);
F M N College, Kollam – IDE Study Centre Page 86
Banking On ATM Card
printf("City :%s",account.city);
gotoxy(5,24);
printf("Balance Amount :%f",account.balance);
delay(300);
for(i=0;i<=10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(50,170,"Account View");
delay(400);
nosound();
}
check();
}
void about()
{
int i,j;
clrscr();
cleardevice();
setbkcolor(BLACK);
setcolor(4);
circle(40,70,30);
circle(130,70,30);
circle(100,130,60);
circle(150,250,100);
circle(70,220,25);
circle(230,200,25);
circle(80,320,30);
circle(240,320,30);
circle(65,115,5);
circle(120,110,5);
circle(110,150,10);
for((int) i=1;i<=10;i++)
{
setcolor(i);
sound(100);
outtextxy(300,200,"Product By :");
F M N College, Kollam – IDE Study Centre Page 87
Banking On ATM Card
outtextxy(300,220," Name : Vinu David .A");
outtextxy(300,240," Reg No : 6209");
outtextxy(300,260," College : F M N C Kollam");
delay(300);
nosound();
}
check();
}
void chpass()
{
float no,balance;
int n,i,fact,ca;
char p1[25],p2[25],pass[25];
FILE *stream;
clrscr();
cleardevice();
titlebar();
no=account.accno;
stream=fopen("Sbiacc.sbi","r+b");
n=bank.n;
for(i=1;i<n;i++)
{
fread(&account,sizeof(account),1,stream);
if((account.accno==no)&&(strcmp(account.stat,"Open")==0))
{
fact=1;
ca=i;
break;
}
else
fact=0;
}
if(fact==1)
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
gotoxy(9,14);
printf("Enter Old Password :");
scanf("%s",&p1);
F M N College, Kollam – IDE Study Centre Page 88
Banking On ATM Card
gotoxy(9,16);
printf("Enter New Password :");
scanf("%s",&p2);
gotoxy(9,18);
printf("Enter Conform Password :");
scanf("%s",&pass);
if((strcmp(account.accpass,p1)==0)&&(strcmp(p2,pass)==0))
{
strcpy(account.accpass,pass);
fwrite((char*)&account, sizeof(account),1, stream);
setcolor(RED);
settextstyle(1,0,2);
outtextxy(400,150,"Password Changed");
delay(1000);
}
else
{
setcolor(RED);
settextstyle(1,0,2);
outtextxy(400,150,"Password Error");
delay(1000);
}
settings();
}
}
void widrow()
{
float no,balance;
int n,i,fact,ca;
FILE *stream;
clrscr();
cleardevice();
titlebar();
no=account.accno;
stream=fopen("Sbiacc.sbi","r+b");
n=bank.n;
for(i=1;i<n;i++)
{
F M N College, Kollam – IDE Study Centre Page 89
Banking On ATM Card
fread(&account,sizeof(account),1,stream);
if((account.accno==no)&&(strcmp(account.stat,"Open")==0))
{
fact=1;
ca=i;
break;
}
else
{
fact=0;
}
}
if(fact==1)
{
fseek(stream,(long)((ca‐1)*sizeof(account)),0);
gotoxy(9,14);
printf("Total Balance Amount :%f",account.balance);
gotoxy(9,16);
printf("Receviale Amount :%f",account.balance‐bank.fix);
gotoxy(9,18);
printf("Widrowing Amount :");
scanf("%f",&balance);
if((account.balance‐bank.fix)>=balance)
{
account.balance=account.balance‐balance;
fwrite((char*)&account, sizeof(account), 1, stream);
}
else
{
setcolor(RED);
settextstyle(1,0,2);
outtextxy(400,150,"Amount Error");
delay(1000);
}
settings();
}
}
void check()
F M N College, Kollam – IDE Study Centre Page 90
Banking On ATM Card
{
int i;
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf(" \7Menu Bar");
gotoxy(25,13);
printf(" 1 . Balance Enquiry");
gotoxy(25,15);
printf(" 2 . Settings");
gotoxy(25,17);
printf(" 3 . Windrow Cash");
gotoxy(25,19);
printf(" 4 . About Me");
gotoxy(25,21);
printf(" 5 . Exit");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
line(175,340,375,340);
printf(" Enter your choice :");
scanf("%d",&i);
switch(i)
{
case 1:
balance();
break;
case 2:
settings();
break;
case 3:
widrow();
break;
case 4:
about();
break;
F M N College, Kollam – IDE Study Centre Page 91
Banking On ATM Card
case 5:
clrscr();
cleardevice();
titlebar();
delay(1000);
gotoxy(15,15);
printf("\please Receive Your ATM Card");
delay(2000);
main();
break;
default:
clrscr();
cleardevice();
titlebar();
gotoxy(25,25);
printf("\7Wrong Decision");
delay(300);
check();
break;
};
}
void main()
{
int gd=DETECT,gm;
char x[10];
FILE *stream,*f1,*f2;
initgraph(&gd,&gm,"c:\\borlandc\\bgi");
clrscr();
cleardevice();
titlebar();
file();
getch();
}
F M N College, Kollam – IDE Study Centre Page 92
Banking On ATM Card
SAMPLE SCREEN SHOTS
F M N College, Kollam – IDE Study Centre Page 93
Banking On ATM Card
Bank Users Window
Administrator Window
F M N College, Kollam – IDE Study Centre Page 94
Banking On ATM Card
Main Menu
F M N College, Kollam – IDE Study Centre Page 95
Banking On ATM Card
Account Menu
F M N College, Kollam – IDE Study Centre Page 96
Banking On ATM Card
Open Account
F M N College, Kollam – IDE Study Centre Page 97
Banking On ATM Card
Edit Record
F M N College, Kollam – IDE Study Centre Page 98
Banking On ATM Card
Display Menu
F M N College, Kollam – IDE Study Centre Page 99
Banking On ATM Card
Bank Balance
F M N College, Kollam – IDE Study Centre Page 100
Banking On ATM Card
Account View
F M N College, Kollam – IDE Study Centre Page 101
Banking On ATM Card
About me
F M N College, Kollam – IDE Study Centre Page 102
Banking On ATM Card
Settings
F M N College, Kollam – IDE Study Centre Page 103
Banking On ATM Card
Change Password
F M N College, Kollam – IDE Study Centre Page 104
Banking On ATM Card
Transaction
F M N College, Kollam – IDE Study Centre Page 105
Banking On ATM Card
Add Deposited
F M N College, Kollam – IDE Study Centre Page 106
Banking On ATM Card
Re‐Audit
F M N College, Kollam – IDE Study Centre Page 107
Banking On ATM Card
Administrator Window
F M N College, Kollam – IDE Study Centre Page 108
Banking On ATM Card
Main Menu
F M N College, Kollam – IDE Study Centre Page 109
Banking On ATM Card
Balance Enquiry
F M N College, Kollam – IDE Study Centre Page 110
Banking On ATM Card
Settings
F M N College, Kollam – IDE Study Centre Page 111
Banking On ATM Card
Windrow Cash
F M N College, Kollam – IDE Study Centre Page 112
Banking On ATM Card
IBLIOGRAPHY
F M N College, Kollam – IDE Study Centre Page 113
Banking On ATM Card
BIBLIOGRAPHY
1. Programming in c ‐ Balaguruswamy
2. Introducing c ‐ David S. Platt; Paperback
3. System Analysis and Design ‐ Alias M
4. The Analysis Design and
Implementation of Information
Systems ‐ Henry C Lucas
5. Software Engineering Concepts ‐ Richard E Fairley
F M N College, Kollam – IDE Study Centre Page 114