You are on page 1of 11

PROJECT REPORT

ON

ATM CODING
(Done in CPP)

SUBMITTED BY,

ASHWIN SAJI
PROJECT REPORT
ON

ATM CODING
(Done in CPP)

SUBMITTED BY,

ASHWIN SAJI

CADD CENTRE TRAINING SERVICES


PATHANAMTHITTA
CPP TRAINING

CERTIFICATE

This is to certify that the project report entitled “ATM CODING” is a bonafide
record of the work done by ASHWIN SAJI (Student ID: LWR180416004) under
our supervision and guidance in CPP for the partial fulfillment of the requirement
for the award of CPP TRAINING during the year 2018 from LIVEWIRE,
PATHANAMTHITTA.

Guide: Manager:
Mrs Keerthi. Mr. Alan Thomas Mathew.

LIVEWIRE, Pathanamthitta
ACKNOWLEDGEMENT

I thank the Almighty God for his immense blessings for the successful
completion of my project. A great deal of time and effort has been spent in
completing this project work. Several special people have guided me and
contributed significantly to this effort and so this becomes obligatory to record my
thanks to them.

I express my profound gratitude to Mr. T.T MATHEWKUTTY


(Centre Head) and Mr. ALAN THOMAS MATHEW (Centre Manager) for their
valuable suggestions, guidance and consistent support.

I have immense pleasure in expressing my sincere gratitude


to all staffs for the encouragement provided by them to make this project a success.

I solemnly express my heartiest gratitude to Mrs. KEERTHI , FACULTY IN


CHARGE-C++, for extending her valuable guidance and suggestions at every
stage for the successful completion of my project.

Finally I thank all other staffs who directly and indirectly contributed
towards the success of this project.

ASHWIN SAJI
INTRODUCTION

This is a simple project on ATM(Automated teller machine).The


code is written in C++ language. Code Blocks is used to compile
the code. The code carry out all the functions that all standard
ATM machines do. We can check amount present in your
account, withdraw balance and display the account information.

In the code below there is only one ATM card holder.


The details of the card holder is saved in a file. The pin is taken
from the file and checked. If both the pins match the rest of the
process is displayed. Else the program will be closed. All the
details of the user is taken from the file. The concepts included
in the project are class,inheritance,and file.
PROJECT CODE
#include<iostream>
#include<fstream>
using namespace std;
class start
{
protected:
string password;
public:
start()
{
cout<<"\t\t*****Welcome to our bank services*****"<<endl;
cout<<"\nEnter your password:";
cin>>password; //GET THE PASSWORD FROM THE USER
}
};
class next:public start
{
string data,password1,a;
int i,current_balance,j,amount,balance,c;
public:
void check()
{
ifstream myfile("atm1.txt");
fstream myfile1("atm1.txt");
myfile.seekg(4,ios::beg);
myfile>>data;
password1=data;
if(password1==password) //CHECKING THE PASSWORDS
{
start:
cout<<"1.Balance Enquiry."<<endl;
cout<<"2.Withdrawal."<<endl;
cout<<"3.Account Information."<<endl;
cout<<"4.Exit."<<endl;
cout<<"Enter your choice:";
cin>>i; //GETTING CHOICE FROM THE USER
switch(i)
{
case 1: //FOR CHECKING BALANCE
myfile.seekg(105,ios::beg);
myfile>>data;
cout<<"\nYour balance is "<<data<<" RS."<<endl;
cout<<"Do you want more
services"<<endl<<"1.Yes"<<endl<<"2.No"<<endl;
cout<<"Enter your choice:"<<endl;
cin>>c;
switch(c)
{
case 1:
goto start;
case 2:
goto stop;
default:
cout<<"Invalid"<<endl;
}
break;
case 2: //WITHDRAWAL
cout<<"\nEnter the amount to be withdrawn:"<<endl;
cin>>amount;
myfile.seekg(105,ios::beg);
myfile>>balance;
current_balance=balance-amount;
cout<<"\nYour balance after withdrawal is
"<<current_balance<<" RS."<<endl;
myfile1.seekg(105,ios::beg);
myfile1<<current_balance;
myfile1.close();
cout<<"Do you want more
services"<<endl<<"1.Yes"<<endl<<"2.No"<<endl;
cout<<"Enter your choice:"<<endl;
cin>>c;
switch(c)
{
case 1:
goto start;
case 2:
goto stop;
default:
cout<<"Invalid"<<endl;
}
break;
case 3: //ACCOUNT INFORMATION
myfile.seekg(8,ios::beg);
myfile>>data;
cout<<data;
myfile>>data;
cout<<" "<<data<<endl;
myfile>>data;
cout<<data;
myfile>>data;
cout<<" "<<data;
myfile>>data;
cout<<" "<<data;
myfile>>data;
cout<<" "<<data<<endl;
myfile>>data;
cout<<data<<endl;
myfile>>data;
cout<<data<<endl;
cout<<"Do you want more
services"<<endl<<"1.Yes"<<endl<<"2.No"<<endl;
cout<<"Enter your choice:"<<endl;
cin>>c;
switch(c)
{
case 1:
goto start;
case 2:
goto stop;
default:
cout<<"Invalid"<<endl;
}
break;
case 4: //EXIT
goto stop;
break;
default:
cout<<"Invalid entry"<<endl;
break;
}
}
else
{
cout<<"\nWrong Password"<<endl;
}
stop:
cout<<"\t*****Thank you for using our banking
services.*****"<<endl;
myfile1.close();
myfile.close();
}
};
int main()
{
next o; //CREATING THE OBJECT
o.check(); //CALLING THE FUNCTION
return 0;
}

TEXT FILE
Pin:2588
Name:Ashwin Saji
Address:Charuvila Puthen Veedu,Chandanappally P.O
Phone:8304044941
Balance:71800

SAMPLE OUTPUT

You might also like