Sunteți pe pagina 1din 114

BankingOnATMCard

1.INTRODUCTION

FMNCollege,KollamIDEStudyCentre

Page1

BankingOnATMCard

1. INTRODUCTION
Database is a collection of information that is used for several
purposesandDatabaseManagementsystemisanapplicationSoftware,thathas
somespecificprogramstoaccessthedatasinthedatabase.Databaseshelp
theuserstocreatealargeamountofinformationsandstoreditinafile
systemorinamemorychip,Innormalcasesclerkshavealotofworkstorecord,
search,editandthedetailsofaAccountingattheBank,itwastesalotoftimes
andtheirmaybeerrorsinthedata,Hereweintroducethe"BankingOnATM
Card".Byusingthissoftwarewecanovercomeallmostallsuchproblemslike
dataredundancy,inconsistency.Anditalsohelpstoimplementstandards

HereweuseFloppydiskorMemoryCardinthecaseofATMcardforavailable
Bankingtransactions.Theyareusedtostorecustomerbankdetails.Heretheseprojectswe
areusethreeDataBasefiles.Oneisusedtostorebankdetailssuchasbankpassword,
fixedamount,interestrate.Yetanotherisusedtostoreallcustomerdetailssuchas
customername,age,sex,password,passportnumberanddepositedamount.
AnotheroneisATMcardsupportfileitisusedtostoreaccountnumberitisusedto
automaticreadingtheaccountnumber.

FMNCollege,KollamIDEStudyCentre

Page2

BankingOnATMCard

1.1 ABSTRACT

TheComputerizationofBankingOnATMCardisthemainobjectiveofthe
project.Byusingthissoftwarepackagethetimeconsumptionandworkburden
willbereducedimmensely.

ThesoftwareentitledasBankingOnATMCardisusedforstoring
detailsoftheAccountingintheBankdatabase.Itisinteractiveanduserfriendly
softwaredevelopedusingClanguage.Theprojectispreparedtoimplementin
DOS/Windows/2000/NTplatforms.

TheprojecthelpstostoreandmaintainalldetailsoftheAccountdetails
inthedatabaseofthecustomerandreducedataredundancy,inconsistency,and
italsohelpstoimplementstandards.Theprojectisdividedintofivemodules.

1.Account
2.Display

3.Settings
4.Transaction
5.Exit

FMNCollege,KollamIDEStudyCentre

Page3

BankingOnATMCard

2.SYSTEMSTUDY

FMNCollege,KollamIDEStudyCentre

Page4

BankingOnATMCard

SYSTEM STUDY

Thesystemstudyisindentedwiththestudyoftheexistingsystem,
thatisaboutthecurrentDatabasesystem,theworkingofthesystem,the
concerned modules, and requirements etc . It also deals with the benefits and
disadvantagesofthesystem.Wemustthoroughlyunderstandtheoldsystem
anddeterminehowcomputerscanbestbeusedtomakeitsoperationsmore
effective.
Beforedevelopmentofanyprojectcanbepursued,asystemstudyis
conductedtolearnthedetailsofthecurrentbusinesssituation.Information
gathered through the study, forms the basis for creating alternative design
strategies.Managementselectsthestrategytopursue.

2.1Existing 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
multipleFileManagementsystemwhichgivesthefacilityforaccessingtheBanking
details.InaFileManagementallworksaredonemanually.Themainproblemof
the manual operation is, it is time consuming and error prone than the
computerizedsystem.Thereexistswastageofdataretrievaltimeasinthecaseof
FMNCollege,KollamIDEStudyCentre

Page5

BankingOnATMCard

search and further processing. There was no efficient system to manipulate the
existingrecords.

TheproblemIobserveinthisareaisthattheuserhastodoall
theoperationsmanually,bysearchingandanalyzinglargeamountofdata,amiss
spelleddigitorcharactermaycreatemanyhoursofextraworkandcomplicated
correctionprocedure.Necessarydatavalidationchecksareincludedtoavoidmistakes

2.2PROPOSEDSYSTEM
Theexistingsystemleadstomanyerrorslikedataredundancy,data
inconstancy,andalsomuchmorepaperworksthatwasteveryvaluabletimeand
money. We collect a lot of information from different current tools and its
advantages.

Keepingthisinmindwedecidedtodevelopasoftwareandnamed
as Banking On ATM Card which is very userfriendly and helps to make
researcharealchore.Thiscomputerizationimprovesefficiencyofofficework,and
alsohelpstokeepdatatoomanyyearswithoutdamageandcanberecollectedas
andwhenneededwithoutmuchtime

The Proposed system solves problems related to data accessing


problems,becauseithelptheusertoadddetailsofthecustomertothebank
database easily ,improving data recovery speed, easy searching and also provide
editingofdatasinthedatabase

FMNCollege,KollamIDEStudyCentre

Page6

BankingOnATMCard

.SYSTEMSPECIFICATION

FMNCollege,KollamIDEStudyCentre

Page7

BankingOnATMCard

3.1

SOFTWARE SPECIFICATION

Language c
OS DOS/ WINDOWS

3 . 2HARDWAREREQUIREMENT

Processor

--

Pentium III

Processor speed

--

600 MHz

Monitor Size

--

15 SVGA

RAM

--

128 MB

HDD

--

20 GB

Floppy drive

--

1.44 MB

Memory Card

--

128 MB

Keyboard

--

104 or higher

Cache

--

512 KB Level 2 Cache

Printer

--

Laser

Modem

--

56.6 Kbps

UPS

--

0.5

KV

FMNCollege,KollamIDEStudyCentre

Page8

BankingOnATMCard

4.SYSTEMANALYSIS

FMNCollege,KollamIDEStudyCentre

Page9

BankingOnATMCard

Feasibility Study
4 .1FeasibilityAnalysis

Themainobjectiveoffeasibilitystudyistotestthetechnical,
social and economic feasibility of developing a system. This is done before
developingasystem.Thisisdonebyinvestigatingtheexistingsysteminthearea
underinvestigationandgeneratingideasaboutthenewsystem.

4.1.1 EconomicandTechnicalFeasibility

The system must be evaluated from the technical view point


first.Theassessmentofthisfeasibilitymustbebasedonanoutlinedesignofthe
systemrequirementintermsofinput,output,programs,procedureandstaff.Having
identifiedtheoutlineofthesystem,theinvestigationmustgoontosuggestthe
typeofequipment,requiredmethodofdevelopingthesystem,andthemethodof
runningthesystem

Thisdevelopingsystemmustbejustifiedbycostandbenefit
criteriatoensurethateffortisconcentratedonprojectwhichwillgivebestreturn
attheearliest.Oneofthefactorswhichaffectthedevelopmentofanewsystemis
thecostitwouldrequire.Sincethesystemisdevelopedasapartofourstudy,
thereisnomanualcosttobespentfortheproposedsystem.

FMNCollege,KollamIDEStudyCentre

Page10

BankingOnATMCard

4.1.2 SocialandBehavioralFeasibility

Proposedprojectwouldbebeneficialonlyiftheycanbeturnedinto

informationsystemthatllmeettheorganizationoperatingrequirements.Oneofthe
mainproblemfacedduringthedevelopmentofanewsystemisgettingacceptance
fromuser.Beingageneralpurposesoftwaretherearenoresistancefromtheusers
becausethiswillbemorebeneficialtotheusers

FMNCollege,KollamIDEStudyCentre

Page11

BankingOnATMCard

5 .SYSTEMDESIGN

FMNCollege,KollamIDEStudyCentre

Page12

BankingOnATMCard

SYSTEM DESIGN

Introduction to SYSTEM DESIGN

Thesystemphaseisthelifecyclephaseinwhichthedetaileddesignofthe
selectedsysteminthestudyphaseisaccomplished.Thedesignphasethetechnical
specificationispreparedfortheperformersofallallocatedtasks.italsoincludethe
constructionsoftheprogrammersandprogramtasks.

Inthedesignphasethefirststepistodesigntheoutputin
detailsfirstandthentoworkbacktotheinputs.Theinputdatabaseshavetobedesign
tomeettherequirementsoftheproposedoutput.Thentotheimplementation
phasethesystemanalysthastobedefinethemethodofcapturingdataandtheinput
programandtheformatoftheoutputitsusebytheusers.

FMNCollege,KollamIDEStudyCentre

Page13

BankingOnATMCard

5.1 Input Design


In input design, the userdefined inputs are converted in to
computerbased format. Input design involves determining the record media,
methodofinput,speedofcaptureandentrytothesystem.Themostimportant
approachtotheinputdesignisformattedandpromptdesign.

UsersideInput

Theinputsprovidedbyuserare

LoginBankPassword

CustomerAccountnumber,Name,age,sex,address,passportnumber

CustomerAccountnumberandCustomerPassword(OnATMCard)

CustomerwidoweranddepositCashamounts

5.2 Output Design


Computer output is the most important and direct source of
information to the user. Designing the computer output should proceed in an
organized,wellthroughoutmanner.Therightoutputmustbedevelopedwhile
ensuringthateachoutputelementisdesignedsothatpeoplewillfindthesystem
easytouseefficiently.Whenanalystsdesigncomputeroutputtheyidentifythe
specific output that is needed to meet the information requirements. Different
methods for the information will be selected. Analyst creates document , report, or
otherformatthatcontaininformationproducedbythesystem

5.3 InterfaceDesign

Interface design mainly focuses on the design of interfaces between

softwaremodules,externalentitiesandtheuser.Thedesignofinternalprogram
FMNCollege,KollamIDEStudyCentre

Page14

BankingOnATMCard

interfaces, sometimes called intermodular interface design, is driven by the data


thatmustflowbetweenmodulesandthecharacteristicsoftheprogramming
Language in which the software is to be implemented. External interface
designbeginswithanevaluationofeachexternalentityrepresentedintheDFDs
oftheanalysismodel.Bothinternalandexternalinterfacedesignmustbecoupled
withdatavalidationanderrorhandlingalgorithmswithinamodule.Becauseside
effectspropagateacrossprograminterfaces,itisessentialtocheckalldataflowing
from module to module to ensure that the data conform to bounds established
duringrequirementsanalysis.Userinterfacedesignhasasmuchtodowiththe
studyofpeopleasitdoeswithtechnologyissues.Whoistheuser?Howdoesthe
userlearntointeractwithanewcomputerbasedsystem?Sothesystemshouldbe
developedinauserfriendlymanner.

5.4 ProceduralDesign

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
componentscalledmodules,whichareintegratedtosatisfyproblemrequirements.
Modularity is the single attribute of software that allows a program to be
intellectuallymanageable.Monolithicsoftware(i.e.,alargeprogramcomprisedofa
singlemodule)cannotbeeasilygraspedbyreader.TheFiveimportantcriteriathat
enableustoevaluateadesignmethodwithrespecttoitsabilitytodefinean
effectiveproceduraldesignare,asdescribedbelow

FMNCollege,KollamIDEStudyCentre

Page15

BankingOnATMCard

5.5

ModularDescription

The administrator has the right to access the system. To get into the
systemtheadministratorhastogivetheBankpassword.IftheBankuserpassword
givenareincorrectthesystemdisplaysamessagetotheusershowingthatthe
givendetailsareinvalid.OtherwiseitgoMainMenubar.Itwillcontainfivestages

Main Menu On Bank Account Viewer

1.AccountMenu

The Account menu is controlled by three stages. Open, edit and close the
customeraccounttheyaredescribeinfollowingsection.

1.1. OpenAccount

The Customer details such as Account number , name, sex , age ,


address , deposited amount are entered by pressing 1 from the Account
menuandthesedetailsaresaved.Thesystempromptswhethertheuser
wantstoaddmorerecords.IfRetype1ispressedtheusercanaddmore
records.

1.2. Edit Record


If the user wants to edit the details of a particular record, then the user
has to enter the Account number by pressing 2 from the Account menu
which represents the record to be edit . The customer city and address are only to
be change and the recordable.

1.3. Close Record


FMNCollege,KollamIDEStudyCentre

Page16

BankingOnATMCard

IftheuserwantstoClosethedetailsofaparticularrecord,thenthe
userhastoentertheAccount number oftheCustomerhe/shewishtoclose
by pressing 3 from the main menu .Thetransactionoftheparticularaccount
customerisclosed.

2. DisplayMenu
TheusercanseealltheBankbalance,Customerdetailsandaboutme,by
pressing2 fromthemainmenu

2.1 BankBalance
Iftheuserwantstosearchforabankbalancedetailsbasedon
theCustomeraccountnumberthenbypressing1 fromthedisplaymenu.
The Software is alsogiven all customer details and balance amount of them by
calculatingdepositedamount.

2.2 Account View


If the user wants to display the details of a particular record, then the
user has to enter the Account number by pressing 2 from the display menu
which represents the record to be displayed . The details are displayed to the user.

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
TheusercanseealltheBankbalance,Customerdetailsandaboutme,by
pressing2 fromthemainmenu

FMNCollege,KollamIDEStudyCentre

Page17

BankingOnATMCard

3.1 ChangePassword
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
wordstobechangedasgivennewpassword.

3.2 Change Interest


Ifthebankuserwantstochangetheoldinterestrateofbankby
pressing2 fromthesettingsmenu.

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
TheusercanseealltheAddDepositedAmount,FreezeAccountandRe
Audit,bypressing2 fromthemainmenu

4.1 AddDepositedAmount
Iftheuserwantstoadddepositedcashtobankbalanceonthe
Customeraccountnumberthenbypressing1 fromtheTransactionmenu.
Afterthattypecustomeraccountnumberanddepositedamount.

4.2 FreezeAccount
IftheuserwantstofreezeanybankaccountontheCustomerthenby
pressing2 fromtheTransactionmenu.Afterthattypecustomeraccount
numberandiftypeytheaccountwillFreezestageitblockallmoney
transactions.OtherwisetypentheaccountwillChangetoopenstage.

4.3ReAudit

FMNCollege,KollamIDEStudyCentre

Page18

BankingOnATMCard

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.

5. Save and Exit

Bypressing5theusercanexitfromthesoftware.

FMNCollege,KollamIDEStudyCentre

Page19

BankingOnATMCard

Main Menu On ATM Account Viewer

TheATMaccountsoftwaremanufacturedbyautomaticreadingofaccount
numberofcustomerATMcard.Whenthecustomerentersthecorrectpasswordonitthe
mainmenuwilldisplaybycheckingthebankaccountisopenstageonly.

1.BalanceEnquiry

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
TheusercanseealltheChangePassword,Account viewandabout
me,bypressing2 fromthemainmenu
2.1 ChangePassword
Iftheuserwantstosearchforabankbalancedetailsbasedon
theCustomeraccountnumberthenbypressing1 fromthedisplaymenu.
The Software is alsogiven all customer details and balance amount of them by
calculatingdepositedamount.

2.2 Account view


If the user wants to display the details of a particular record, then the
user has to enter the Account number by pressing 2 from the settings menu
which represents the record to be displayed . The details are displayed to the user.

FMNCollege,KollamIDEStudyCentre

Page20

BankingOnATMCard

3. WindrowCash
Thecustomerwanttoreceivehisamountbypressing3 fromthemainmenu
.Thecustomercaneasilyreceivehiscash.

4. Aboutme

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

Bypressing5theusercanexitfromtheATMcardcurrentlyuse.Automatically
rereadthenextATMwhilewewillbeinsertinginfewsecondafterorpleaseuse
theenterkey.

FMNCollege,KollamIDEStudyCentre

Page21

BankingOnATMCard

5.6 Data flow diagrams

TheDataflowdiagramswasfirstdevelopedbyLarryConstantineasaway

ofexpressingsystemrequirementsinagraphicalformandthisledtomodular
design.
A data flow diagram , also known as Bubble Chart has the purpose of
clarifying system requirements and identifying major transactions that will become
programsinsystemdesign.ADFDconsistsofseriesofsquaresjoinedbylines.The
squaresrepresentthedatatransformationsandthelinesrepresentdataflowsinthe
system.

DFDSymbols
1. Arectangledefinesasource(originator)ordesignationofsystemdata.
2. An arrow identifies data flow i.e., data in motion. It is a pipeline through which
information flows?
3.

A circle represents a process that transforms incoming data flows into


Outgoing data flows.

4. An open rectangle is a data store , data at rest , or a temporary repository of


data .

FMNCollege,KollamIDEStudyCentre

Page22

BankingOnATMCard

1. Data flow diagrams for banking system

Administrator

FMNCollege,KollamIDEStudyCentre

Page23

BankingOnATMCard

CONTEXTLEVELDFD

FMNCollege,KollamIDEStudyCentre

Page24

BankingOnATMCard

OpenAccount

FMNCollege,KollamIDEStudyCentre

Page25

BankingOnATMCard

1.2EditAccount

FMNCollege,KollamIDEStudyCentre

Page26

BankingOnATMCard

1.3 CloseAccount

FMNCollege,KollamIDEStudyCentre

Page27

BankingOnATMCard

2. DisplayMenu

BankBalance

FMNCollege,KollamIDEStudyCentre

Page28

BankingOnATMCard

2.2Accountview

FMNCollege,KollamIDEStudyCentre

Page29

BankingOnATMCard

Settings

3.1ChangePassword

FMNCollege,KollamIDEStudyCentre

Page30

BankingOnATMCard

3.2ChangeInterestRate

FMNCollege,KollamIDEStudyCentre

Page31

BankingOnATMCard

4.TransactionMenu

4.1AddDeposit

FMNCollege,KollamIDEStudyCentre

Page32

BankingOnATMCard

4.2FreezeAccount

FMNCollege,KollamIDEStudyCentre

Page33

BankingOnATMCard

4.3ReAudit

FMNCollege,KollamIDEStudyCentre

Page34

BankingOnATMCard

2. Data flow diagrams on ATM card system

1.BalanceEnquiry

FMNCollege,KollamIDEStudyCentre

Page35

BankingOnATMCard

2. Settings

2.1 ChangePassword

FMNCollege,KollamIDEStudyCentre

Page36

BankingOnATMCard

2.2Accountview

FMNCollege,KollamIDEStudyCentre

Page37

BankingOnATMCard

3. WindrowCash

FMNCollege,KollamIDEStudyCentre

Page38

BankingOnATMCard

STRUCTURE CHART
1.BankingSystem

FMNCollege,KollamIDEStudyCentre

Page39

BankingOnATMCard

2. BankingonATMCard

FMNCollege,KollamIDEStudyCentre

Page40

BankingOnATMCard

6.IMPLEMENTATIONANDTESTING

FMNCollege,KollamIDEStudyCentre

Page41

BankingOnATMCard

6.1IMPLEMENTATION
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

Investigations of system constrain

Design the method to achieve the change over

Training the staff in the change phase

Evaluation of change over method

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

FMNCollege,KollamIDEStudyCentre

Page42

BankingOnATMCard

FMNCollege,KollamIDEStudyCentre

Page43

BankingOnATMCard

FMNCollege,KollamIDEStudyCentre

Page44

BankingOnATMCard

FMNCollege,KollamIDEStudyCentre

Page45

BankingOnATMCard

FMNCollege,KollamIDEStudyCentre

Page46

BankingOnATMCard

FMNCollege,KollamIDEStudyCentre

Page47

BankingOnATMCard

7.CONCLUSION

FMNCollege,KollamIDEStudyCentre

Page48

BankingOnATMCard

CONCLUSION

This project Banking On ATM Card deals with the Member


additionprocess,Edit,delete,andsearchprocessforCustomerdetails.Thisproject
issuccessfulinmeetingthegoalsofthisconcern,wherethemanualsystemwas
notattheirfullsatisfaction.Bycomputerizingtheconcern,theaccuracyofthe
datarecordinghasbeenincreasedandthespeedisalsoincreased.

This system provides precise enlistment of customer information. It


recordsthecustomerdetailsandgiveadequateinformationaboutthecustomer.
Data can be retrieved as and when required. It creates different data and are stored in
differentFilesections.Thesefilesarealsousedforfurtherprocesses

FMNCollege,KollamIDEStudyCentre

Page49

BankingOnATMCard

APPENDIX

FMNCollege,KollamIDEStudyCentre

Page50

BankingOnATMCard

Install file
#include
#include
#include
#include
#include
#include
#include

<stdio.h>
<conio.h>
<graphics.h>
<stdlib.h>
<dos.h>
<string.h>
<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);
FMNCollege,KollamIDEStudyCentre

Page51

BankingOnATMCard

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
scanf("%f",&bank.fix);

: ");

\t: ");

gotoxy(12,19);
printf("Enter the Bank Password \t: ");
scanf("%s",&bank.pass);

if ((stream = fopen("Sbi.sbi", "wb")) == NULL)


{ clrscr();
cleardevice();
gotoxy(16,15);
printf("Cannot Write output file.");
delay(200);
}
else
{
fwrite(&bank, sizeof(bank), 1, stream);
fclose(stream);
FMNCollege,KollamIDEStudyCentre

Page52

BankingOnATMCard

gotoxy(15,28);
setcolor(YELLOW);
rectangle(100,417,600,448);
printf("Saving . . .");
show();
}
exit(0);
getch();
}

/////////// Created By Vinu David A


//////////

To FMN College , India

//////////

Kerala , Kollam

//////////

Mob : - 97 46 96 86 37

//////////

E-Mail : Adr.Vinu@Gmail.com

Bank Users Code:


#include
#include
#include
#include
#include
#include
#include

<stdio.h>
<conio.h>
<graphics.h>
<stdlib.h>
<dos.h>
<string.h>
<alloc.h>

void closewin();
void show2();
void check();
void settings();
void tran();
void form1();
FMNCollege,KollamIDEStudyCentre

Page53

BankingOnATMCard

void vochers();
void display();
void about();
void export();
void modacc();
void adddepo();
void close();
void bankdisplay();
void main();
void help();
intsd,sm,sy;

structsbi
{
intn;
charpass[10];
floatinter,fix;
}bank;

structatm
{
floataccno;
charname[30];
intage,sd,sm,sy;
charsex[5];
charstat[10];
}card;

structacc
{

floataccno;

charname[30],accpass[25],address[101],city[25];

floatfix,ppno,balance;

charstat[5];
}account;

voidtinreat(intx,inty,intp,intq,intt)
FMNCollege,KollamIDEStudyCentre

Page54

BankingOnATMCard

inti;
setcolor(RED);

for(i=1;i<=t;i++)

rectangle(p,q,x+i,y+i);

delay(100);

voidtitlebar()
{
setcolor(BLUE);

settextstyle(0,0,6);
outtextxy(30,30,"SBI");

setcolor(6);

settextstyle(0,0,2);

outtextxy(200,30,"StateBankOfIndia");
setcolor(7);

settextstyle(0,0,1);

outtextxy(230,50,"ChinakadaRoad,Kerala,Kollam");
outtextxy(270,65,"Pincode:691001");

line(100,100,500,100);
}

voidshow1()
{

inti,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);
FMNCollege,KollamIDEStudyCentre

Page55

BankingOnATMCard

delay(10);

}
show2();
}

voidshow2()
{

inti,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,"StateBankOfIndia");

setcolor(7);

settextstyle(0,0,1);

outtextxy(230,50,"ChinakadaRoad,Kerala,Kollam");

outtextxy(270,65,"Pincode:691001");

for(i=0;i<=400;i++)

line(100,100,100+i,100);

delay(10);

}
}
voidhelp()
{
inti,j;
clrscr();
cleardevice();
titlebar();
FMNCollege,KollamIDEStudyCentre

Page56

BankingOnATMCard

for(i=1;i<10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(80,150,"HelpMenu");
gotoxy(10,12);
printf("\tThisaveryGUIfreindlyBankingAccountingSoftware.Follwingarekeycasesusedtodatainsert
andmodifys");
printf("\n\n1.Account\n\n\tCreate,edit,closeanAccountarecontainthisproperty");
printf("\n2.Display\n\n\tBankBalance,AccountInformation,AboutMeasarecontainthisproperty");
printf("\n3.Settings\n\n\tChagePassword,ChangeInterestRateasonBankproperty");
printf("\n4.Transaction\n\n\tAddDeposite,ReAuditanAccountsamountcontainthisproperty");
printf("\n5.Exit.\n\n\tThiscontainexitSBIAccountpropertyorQuitthesoftware.");
delay(800);
nosound();
}
settings();
}
voidaddform()
{
intn,i,age,sd,sm,sy;
charname[30],c[4],address[100],stat[5],sex[5],city[25],pass[25];
floatfix,balance,ppno;
structdated;
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);
FMNCollege,KollamIDEStudyCentre

Page57

BankingOnATMCard

line(50,290,600,290);
line(50,325,600,325);
line(50,370,600,370);
gotoxy(9,12);
printf("AccountNumber:");
printf("%d",n+1000);
gotoxy(40,12);
printf("OpeningDate:");
printf("%d%d%d",sd,sm,sy);
gotoxy(9,14);
printf("AccountName:");
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("\7AccountPassword:");
scanf("%s",pass);
gotoxy(9,22);
printf("DepociteAmount:");
scanf("%f",&balance);
if(balance<bank.fix)
{
gotoxy(9,30);
printf("FixedAmountisLow.MinimumAmountis%f",bank.fix);
}
gotoxy(40,22);
printf("PassportNumber:");
scanf("%f",&ppno);
gotoxy(9,25);
FMNCollege,KollamIDEStudyCentre

Page58

BankingOnATMCard

printf("DoyouWanttoSaveThisAccount(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();
FMNCollege,KollamIDEStudyCentre

Page59

BankingOnATMCard

cleardevice();

titlebar();

vochers();

else

clrscr();

cleardevice();

titlebar();

vochers();

}
}

voidaccview()
{
floatno;
intn,i,fact;
floatbalance;
FILE*stream;
clrscr();
cleardevice();
titlebar();

stream=fopen("Sbiacc.sbi","r+b");

gotoxy(25,15);

printf("EnterAccountNumber:");

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;

}
FMNCollege,KollamIDEStudyCentre

Page60

BankingOnATMCard

}
if(fact==1)
{

clrscr();

cleardevice();

titlebar();

setcolor(YELLOW);

rectangle(50,150,600,450);

gotoxy(9,14);

printf("AcountNumber:%f",account.accno);

gotoxy(9,16);

printf("AccountName :%s",account.name);

gotoxy(9,18);

printf("AccountStandard:%s",account.stat);

gotoxy(9,20);

printf("PassportNumber:%f",account.ppno);

gotoxy(9,22);

printf("Address:%s",account.address);

gotoxy(9,24);

printf("City

:%s",account.city);

gotoxy(9,26);

printf("BalanceAmount:%f",account.balance);

delay(1000);

for(i=0;i<=10;i++)

setcolor(i);

sound(100);

settextstyle(0,0,2);

outtextxy(80,170,"AccountView");

delay(300);

nosound();

fclose(stream);

clrscr();

cleardevice();

titlebar();

display();
}
else

FMNCollege,KollamIDEStudyCentre

Page61

BankingOnATMCard

clrscr();

cleardevice();

gotoxy(25,25);

titlebar();

setcolor(RED);

settextstyle(1,0,1);

outtextxy(400,250,"AccountNumberWrong");

adddepo();

}
}

voiddisplay()
{
inti;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf("MenuBarDisplay");
gotoxy(25,13);
printf("1.BankBalance");
gotoxy(25,15);
printf("2.AccountView");
gotoxy(25,17);
printf("3.AboutMe");
gotoxy(25,19);
printf("4.GoBack");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:
FMNCollege,KollamIDEStudyCentre

Page62

BankingOnATMCard

bankdisplay();

break;

case2:

accview();

break;

case3:

about();

break;

case4:

clrscr();

cleardevice();

titlebar();

form1();

break;

default:

gotoxy(25,25);

printf("\7WrongDecision");

delay(300);

display();

break;

};
}
voidbankdisplay()
{

inti=1,n;

floata=0;

FILE*stream;

clrscr();

cleardevice();

stream=fopen("Sbiacc.sbi","r+b");

titlebar();

gotoxy(1,12);

printf("SlNo\tAccountNo\t\tCustomerName\t\t\tBalance");

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);
FMNCollege,KollamIDEStudyCentre

Page63

BankingOnATMCard

a=a+account.balance;

fclose(stream);

printf("\n\n");

printf("\n\t\t\t\tBankBalance:%f",a);

printf("\n\n");

delay(7000);

form1();
}
voidadddepo()
{
floatno;
intn,i,fact,ca;
floatbalance;
FILE*stream;
clrscr();
cleardevice();
titlebar();

stream=fopen("Sbiacc.sbi","r+b");

gotoxy(25,15);

printf("EnterAccountNumber:");

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();
FMNCollege,KollamIDEStudyCentre

Page64

BankingOnATMCard

titlebar();

setcolor(YELLOW);

rectangle(50,150,600,350);

fseek(stream,(long)((ca1)*sizeof(account)),0);

gotoxy(9,14);

printf("AcountNumber:%f",account.accno);

gotoxy(9,16);

printf("AccountName :%s",account.name);

gotoxy(9,18);

printf("DepositedAmount:");

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,"AccountNumberWrong,FreezeorCloseAccountNumber");

adddepo();

}
}
voidvochers()
{
inti;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf("MenuBarAccount");
FMNCollege,KollamIDEStudyCentre

Page65

BankingOnATMCard

gotoxy(25,13);
printf("1.OpenAccount");
gotoxy(25,15);
printf("2.EditAccount");
gotoxy(25,17);
printf("3.CloseAccount");
gotoxy(25,19);
printf("4.GoBack");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:

addform();

break;

case2:

modacc();

break;

case3:

closewin();

break;

case4:

clrscr();

cleardevice();

titlebar();

form1();

break;

default:

gotoxy(25,25);

printf("WrongDecision");

delay(100);

clrscr();

cleardevice();
FMNCollege,KollamIDEStudyCentre

Page66

BankingOnATMCard

titlebar();

vochers();

break;

};
}

voidmodacc()
{
floatno;
inti=1,fact=0,ca,tsize;
charname[30],address[100],city[25];
FILE*stream;
clrscr();
cleardevice();
titlebar();
stream=fopen("Sbiacc.sbi","r+b");

gotoxy(25,15);

printf("EnterAccountNumber:");

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("EditMenu");
FMNCollege,KollamIDEStudyCentre

Page67

BankingOnATMCard

gotoxy(9,14);

printf("============================");

fseek(stream,(long)((ca1)*sizeof(account)),0);

gotoxy(9,16);

printf("\7Accountnumber:%f",account.accno);

gotoxy(9,18);

printf("Accountname :%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,"AccountNumberWrong");

printf("\7");

delay(300);

vochers();

}
}

voidfreezeacc()
{
inti,n,ca,fact=0;
floatfre;
FMNCollege,KollamIDEStudyCentre

Page68

BankingOnATMCard

charc[5];
FILE*stream;
clrscr();
cleardevice();
titlebar();
gotoxy(25,20);
stream=fopen("Sbiacc.sbi","r+b");
printf("EntertheAccountNumber:");
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("AccountNumber

:%f",account.accno);

gotoxy(9,16);

printf("AccountName:%s",account.name);

gotoxy(9,18);

printf("YouWanttoFreezethisAccount(y/n):");

scanf("%s",&c);

if(strcmp(c,"y")==0)

fseek(stream,(long)((ca1)*sizeof(account)),0);

strcpy(account.stat,"Freeze");

fwrite((char*)&account,sizeof(account),1,stream);

fclose(stream);

tran();

}
FMNCollege,KollamIDEStudyCentre

Page69

BankingOnATMCard

else

fseek(stream,(long)((ca1)*sizeof(account)),0);

strcpy(account.stat,"Open");

fwrite((char*)&account,sizeof(account),1,stream);

fclose(stream);

tran();

else

clrscr();

cleardevice();

titlebar();

outtextxy(400,250,"WrongAccountNumber");

delay(500);

tran();

}
tran();
}
voidclosewin()
{
inti,n,ca,fact=0;
floatfre;
charc[5];
FILE*stream;
clrscr();
cleardevice();
titlebar();
gotoxy(25,20);
stream=fopen("Sbiacc.sbi","r+b");
printf("EntertheAccountNumber:");
scanf("%f",&fre);
n=bank.n;
for(i=1;i<n;i++)
{

fread(&account,sizeof(account),1,stream);

if(account.accno==fre)

{
FMNCollege,KollamIDEStudyCentre

Page70

BankingOnATMCard

fact=1;

ca=i;

break;

}
}
if(fact==1)
{

clrscr();

titlebar();

gotoxy(9,14);

printf("AccountNumber

:%f",account.accno);

gotoxy(9,16);

printf("AccountName:%s",account.name);

gotoxy(9,18);

printf("YouWanttoClosethisAccount(y/n):");

scanf("%s",&c);

if(strcmp(c,"y")==0)

fseek(stream,(long)((ca1)*sizeof(account)),0);

strcpy(account.stat,"Close");

fwrite((char*)&account,sizeof(account),1,stream);

fclose(stream);

tran();

else

fseek(stream,(long)((ca1)*sizeof(account)),0);

strcpy(account.stat,"Open");

fwrite((char*)&account,sizeof(account),1,stream);

fclose(stream);

tran();

}
else
{

clrscr();
cleardevice();
titlebar();

FMNCollege,KollamIDEStudyCentre

Page71

BankingOnATMCard

outtextxy(400,250,"WrongAccountNumber");

delay(500);

tran();

}
tran();
}
voidtran()
{
inti,j,n,sd,sm,sy,tsize;
charname[30],stat[5],accpass[25],address[101],city[25];
doubleppno;
floatfix,balance,accno,no;
structdated;
FILE*stream;
getdate(&d);
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf("MenuBarTransaction");
gotoxy(25,13);
printf("1.AddDepositedAmount");
gotoxy(25,15);
printf("2.FreezeAccounts");
gotoxy(25,17);
printf("3.ReAudit");
gotoxy(25,19);
printf("4.GoBack");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:
FMNCollege,KollamIDEStudyCentre

Page72

BankingOnATMCard

adddepo();

break;

case2:

freezeacc();

break;

case3:

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\nInterestRate:%fPercentage",bank.inter);

printf("\tCurrentDate:%d%d%d",sd,sm,sy);

printf("\n\n\n\7Sl\tAccount\tAccount\tAmount\tTotal");

printf("\nno\tNumber\tName\t\trate");

printf("\n");

n=bank.n;

for(i=0;i<n1;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\tEndOfReAudit...");

fclose(stream);

delay(5000);

tran();

break;

case4:

form1();
FMNCollege,KollamIDEStudyCentre

Page73

BankingOnATMCard

break;

default:

gotoxy(25,25);

printf("\7WrongDecision");

delay(300);

tran();

break;

};
}
voidsettings()
{
inti,n,sd,sm,sy;
charnew1[10],old[10],new2[10];
structdated;
FILE*stream;
getdate(&d);
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf("MenuBarSettings");
gotoxy(25,13);
printf("1.ChangePassword");
gotoxy(25,15);
printf("2.Changeinterest");
gotoxy(25,17);
printf("3.Help");
gotoxy(25,19);
printf("4.GoBack");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)
FMNCollege,KollamIDEStudyCentre

Page74

BankingOnATMCard

{
case1:

clrscr();

cleardevice();

titlebar();

gotoxy(10,10);

printf("EnterOldPassword:");

scanf("%s",&old);

gotoxy(10,12);

printf("EnterNewPassword:");

scanf("%s",&new1);

gotoxy(10,14);

printf("ConformPassword:");

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,"PasswordChanged");

delay(600);

clrscr();

cleardevice();

titlebar();

settings();

else

setcolor(RED);

settextstyle(1,0,3);

outtextxy(400,250,"PasswordWrong");

delay(700);

clrscr();

cleardevice();

titlebar();

settings();

break;
case2:

FMNCollege,KollamIDEStudyCentre

Page75

BankingOnATMCard

clrscr();

cleardevice();

titlebar();

gotoxy(10,12);

printf("OldInterestRate:%f",bank.inter);

gotoxy(10,14);

printf("EnternewInterestRate:");

scanf("%f",&bank.inter);

settings();

break;

case3:

help();

break;

case4:

clrscr();

cleardevice();

titlebar();

form1();

break;

default:

gotoxy(25,25);

printf("WrongDecision");

delay(100);

clrscr();

cleardevice();

titlebar();

settings();

break;

};
}

voidexport()
{
FILE*stream;
if((stream=fopen("A:\Sbi.sbi","w+"))==NULL)
{clrscr();
cleardevice();
titlebar();
gotoxy(16,15);
FMNCollege,KollamIDEStudyCentre

Page76

BankingOnATMCard

printf("\7CannotWriteATMCardfiles.");
delay(100);
}
else

fwrite(&card,sizeof(card),1,stream);
fclose(stream);
}

voidabout()
{

inti,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,"ProductBy:");

outtextxy(300,220,"Name:VinuDavid.A");

outtextxy(300,240,"RegNo:6209");

outtextxy(300,260,"College:FMNCKollam");

delay(300);

nosound();

form1();
FMNCollege,KollamIDEStudyCentre

Page77

BankingOnATMCard

voidsaveexit()
{
FILE*stream;
clrscr();
cleardevice();
titlebar();

if((stream=fopen("Sbi.sbi","wb"))==NULL)
{clrscr();
cleardevice();
titlebar();
gotoxy(16,15);
printf("CannotWriteoutputfile.");
delay(200);
}
else
{

fwrite(&bank,sizeof(bank),1,stream);

fclose(stream);
}
exit(0);
}

voidform1()
{
inti;
clrscr();
cleardevice();
titlebar();
gotoxy(27,10);
printf("MenuBar");
gotoxy(25,13);
printf("1.Account");
gotoxy(25,15);
printf("2.Display");
gotoxy(25,17);
printf("3.Settings");
FMNCollege,KollamIDEStudyCentre

Page78

BankingOnATMCard

gotoxy(25,19);
printf("4.Transaction");
gotoxy(25,21);
printf("5.SaveAndExit");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:

vochers();

break;

case2:

display();

break;

case3:

settings();

break;

case4:

tran();

break;

case5:

saveexit();

break;

default:

gotoxy(25,25);

printf("WrongDecision");

delay(100);

clrscr();

cleardevice();

titlebar();

form1();

break;
FMNCollege,KollamIDEStudyCentre

Page79

BankingOnATMCard

};
}

voidpassword()
{
charpas[25];

gotoxy(25,15);

printf("EnterthePassword:");

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,"PasswordWrong");

password();

}
}

voidmain()
{

intgd=DETECT,gm;

FILE*stream;

clrscr();

initgraph(&gd,&gm,"c:\\borlandc\\bgi");

if((stream=fopen("Sbi.sbi","rb"))==NULL)

gotoxy(25,25);
FMNCollege,KollamIDEStudyCentre

Page80

BankingOnATMCard

printf("MisingFiles...");
delay(500);
exit(0);
fread(&bank,sizeof(bank),1,stream);
fclose(stream);
show1();
password();
getch();

ATM Users Code:


#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();
FMNCollege,KollamIDEStudyCentre

Page81

BankingOnATMCard

structsbi
{
intn;
charpass[10];
floatinter,fix;
}bank;
structatm
{
floataccno,ppno;
charname[30];
intage,sd,sm,sy;
charsex[5];
charstat[10];
}card;
structacc
{

floataccno;

charname[30],accpass[25],address[101],city[25];

floatfix,ppno,balance;

charstat[5];
}account;
voidtitlebar()
{

setcolor(BLUE);

settextstyle(0,0,6);

outtextxy(30,30,"SBI");

setcolor(6);

settextstyle(0,0,2);

outtextxy(200,30,"StateBankOfIndia");

setcolor(7);

settextstyle(0,0,1);

outtextxy(230,50,"ChinakadaRoad,Kerala,Kollam");

outtextxy(270,65,"Pincode:691001");

line(100,100,500,100);
}

voidfile()
{
FILE*stream;
FMNCollege,KollamIDEStudyCentre

Page82

BankingOnATMCard

intn,i,j;

gotoxy(20,30);

printf("PleaceInserttheATMCard");

if((stream=fopen("Sbi.sbi","a+b"))==NULL)

gotoxy(20,30);

fprintf(stderr,"FileMissing");

else

fread(&bank,sizeof(bank),1,stream);

if((stream=fopen("A:\Sbi.sbi","a+b"))==NULL)

gotoxy(20,30);

printf("\tPleaceInsertATMCard...");

else

fread(&card,sizeof(card),1,stream);

if((stream=fopen("Sbiacc.sbi","a+b"))==NULL)

gotoxy(20,30);

printf("FileMissing");

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);
FMNCollege,KollamIDEStudyCentre

Page83

BankingOnATMCard

}
}

voidpassword()
{
charpass[25];
clrscr();
cleardevice();
titlebar();
gotoxy(20,15);
printf("AccountNumber:%f",account.accno);
gotoxy(20,18);
printf("EnterthePassword:");
scanf("%s",&pass);
if(strcmp(account.accpass,pass)==0)
check();
else
{

setcolor(RED);

settextstyle(1,0,1);

outtextxy(400,250,"PasswordWrong");

printf("\7");

delay(300);

main();
}
}

voidbalance()
{
inti;
clrscr();
cleardevice();
titlebar();

clrscr();

cleardevice();

titlebar();

setcolor(YELLOW);

rectangle(50,150,600,450);

delay(300);
FMNCollege,KollamIDEStudyCentre

Page84

BankingOnATMCard

check();
}

gotoxy(9,14);
printf("\7AcountNumber:%f",account.accno);
gotoxy(9,16);
printf("AccountName:%s",account.name);
gotoxy(9,18);
printf("BalanceAmount:%f",account.balance);
gotoxy(9,20);
printf("ReceivableAmount:%f",account.balancebank.fix);
delay(500);
for(i=0;i<=10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(55,170,"BalanceView");
delay(400);
nosound();
}

voidsettings()
{inti;
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf("\7MenuBarSettings");
gotoxy(25,13);
printf("1.ChangePassword");
gotoxy(25,15);
printf("2.AccountView");
gotoxy(25,17);
printf("3.GoBack");
gotoxy(23,23);
setcolor(YELLOW);
rectangle(175,130,375,380);
line(175,160,375,160);
line(175,165,375,165);
FMNCollege,KollamIDEStudyCentre

Page85

BankingOnATMCard

line(175,340,375,340);
printf("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:

chpass();

break;

case2:

accview();

break;

case3:

check();

break;

default:

gotoxy(25,25);

printf("\7WrongDecision");

delay(300);

check();

break;

};
}
voidaccview()
{
inti;
clrscr();
cleardevice();
titlebar();

gotoxy(5,14);

printf("AccountNumber
:%f",account.accno);

gotoxy(40,14);

printf("AccountOpenDate:%d%d%d",card.sd,card.sm,card.sy);

gotoxy(5,16);

printf("AccountName:%s",account.name);

gotoxy(5,18);

printf("PassportNumber:%f",account.ppno);

gotoxy(5,20);

printf("Address:%s",account.address);

gotoxy(5,22);
FMNCollege,KollamIDEStudyCentre

Page86

BankingOnATMCard

printf("City
:%s",account.city);
gotoxy(5,24);
printf("BalanceAmount:%f",account.balance);
delay(300);
for(i=0;i<=10;i++)
{
setcolor(i);
sound(100);
settextstyle(0,0,2);
outtextxy(50,170,"AccountView");
delay(400);
nosound();
}
check();

voidabout()
{

inti,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,"ProductBy:");

FMNCollege,KollamIDEStudyCentre

Page87

BankingOnATMCard

outtextxy(300,220,"Name:VinuDavid.A");
outtextxy(300,240,"RegNo:6209");
outtextxy(300,260,"College:FMNCKollam");
delay(300);
nosound();
}
check();

voidchpass()
{
floatno,balance;
intn,i,fact,ca;
charp1[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)((ca1)*sizeof(account)),0);

gotoxy(9,14);

printf("EnterOldPassword:");

scanf("%s",&p1);
FMNCollege,KollamIDEStudyCentre

Page88

BankingOnATMCard

gotoxy(9,16);
printf("EnterNewPassword:");
scanf("%s",&p2);
gotoxy(9,18);
printf("EnterConformPassword:");
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,"PasswordChanged");
delay(1000);
}
else
{
setcolor(RED);
settextstyle(1,0,2);
outtextxy(400,150,"PasswordError");
delay(1000);
}
settings();

voidwidrow()
{
floatno,balance;
intn,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++)

{
FMNCollege,KollamIDEStudyCentre

Page89

BankingOnATMCard

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)((ca1)*sizeof(account)),0);

gotoxy(9,14);

printf("TotalBalanceAmount:%f",account.balance);

gotoxy(9,16);

printf("RecevialeAmount:%f",account.balancebank.fix);

gotoxy(9,18);

printf("WidrowingAmount:");

scanf("%f",&balance);

if((account.balancebank.fix)>=balance)

account.balance=account.balancebalance;

fwrite((char*)&account,sizeof(account),1,stream);

else

setcolor(RED);

settextstyle(1,0,2);

outtextxy(400,150,"AmountError");

delay(1000);

settings();
}

voidcheck()
FMNCollege,KollamIDEStudyCentre

Page90

BankingOnATMCard

{
inti;
clrscr();
cleardevice();
titlebar();
gotoxy(25,10);
printf("\7MenuBar");
gotoxy(25,13);
printf("1.BalanceEnquiry");
gotoxy(25,15);
printf("2.Settings");
gotoxy(25,17);
printf("3.WindrowCash");
gotoxy(25,19);
printf("4.AboutMe");
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("Enteryourchoice:");
scanf("%d",&i);

switch(i)

case1:

balance();

break;

case2:

settings();

break;

case3:

widrow();

break;

case4:

about();

break;
FMNCollege,KollamIDEStudyCentre

Page91

BankingOnATMCard

case5:

clrscr();

cleardevice();

titlebar();

delay(1000);

gotoxy(15,15);

printf("\pleaseReceiveYourATMCard");

delay(2000);

main();

break;

default:

clrscr();

cleardevice();

titlebar();

gotoxy(25,25);

printf("\7WrongDecision");

delay(300);

check();

break;

};
}
voidmain()
{

intgd=DETECT,gm;

charx[10];

FILE*stream,*f1,*f2;

initgraph(&gd,&gm,"c:\\borlandc\\bgi");

clrscr();

cleardevice();

titlebar();

file();

getch();

FMNCollege,KollamIDEStudyCentre

Page92

BankingOnATMCard

SAMPLESCREENSHOTS

FMNCollege,KollamIDEStudyCentre

Page93

BankingOnATMCard

BankUsersWindow

AdministratorWindow

FMNCollege,KollamIDEStudyCentre

Page94

BankingOnATMCard

MainMenu

FMNCollege,KollamIDEStudyCentre

Page95

BankingOnATMCard

Account Menu

FMNCollege,KollamIDEStudyCentre

Page96

BankingOnATMCard

OpenAccount

FMNCollege,KollamIDEStudyCentre

Page97

BankingOnATMCard

Edit Record

FMNCollege,KollamIDEStudyCentre

Page98

BankingOnATMCard

DisplayMenu

FMNCollege,KollamIDEStudyCentre

Page99

BankingOnATMCard

BankBalance

FMNCollege,KollamIDEStudyCentre

Page100

BankingOnATMCard

Account View

FMNCollege,KollamIDEStudyCentre

Page101

BankingOnATMCard

About me

FMNCollege,KollamIDEStudyCentre

Page102

BankingOnATMCard

Settings

FMNCollege,KollamIDEStudyCentre

Page103

BankingOnATMCard

ChangePassword

FMNCollege,KollamIDEStudyCentre

Page104

BankingOnATMCard

Transaction

FMNCollege,KollamIDEStudyCentre

Page105

BankingOnATMCard

AddDeposited

FMNCollege,KollamIDEStudyCentre

Page106

BankingOnATMCard

ReAudit

FMNCollege,KollamIDEStudyCentre

Page107

BankingOnATMCard

ATM Account Viewer


AdministratorWindow

FMNCollege,KollamIDEStudyCentre

Page108

BankingOnATMCard

MainMenu

FMNCollege,KollamIDEStudyCentre

Page109

BankingOnATMCard

BalanceEnquiry

FMNCollege,KollamIDEStudyCentre

Page110

BankingOnATMCard

Settings

FMNCollege,KollamIDEStudyCentre

Page111

BankingOnATMCard

WindrowCash

FMNCollege,KollamIDEStudyCentre

Page112

BankingOnATMCard

IBLIOGRAPHY

FMNCollege,KollamIDEStudyCentre

Page113

BankingOnATMCard

BIBLIOGRAPHY

1. ProgrammingincBalaguruswamy
2. Introducingc

DavidS.Platt;Paperback

3. SystemAnalysisandDesignAliasM
4. TheAnalysisDesignand
ImplementationofInformation
Systems

HenryCLucas

5. SoftwareEngineeringConceptsRichardEFairley

FMNCollege,KollamIDEStudyCentre

Page114