Wednesday, September 8, 2010

ATM MACHINE IN C++

















Abstract

This project shows the working of an ATM machine using C/C++.

An ATM (Automated Teller Machine) is generally used to perform following tasks:

· Withdrawal of Cash

· Balance Enquiry

· Changing Pin

· Mini Statement

This project demonstrates the working of an ATM. It first asks the user to enter the pin of their account. If the pin is correct he is allowed to perform further operations. Its up to the user to choose which task he wants to perform. A user can withdraw cash if he has sufficient balance. Otherwise he is not allowed to withdraw cash. Similarly he can perform other operations.


Introduction

This project gives a brief idea on working of an ATM. ATM (Automated Teller Machine) is used in almost all banks to perform various operations/functions. It facilitates the interaction between customers and bank without waiting in long queues for withdrawal of cash. ATM usually performs following tasks:

1. Withdrawal of cash

2. Balance enquiry

3. Change of pin

4. Mini Statement

This ATM machine is designed using the concepts of C/C++ languages using turbo C++ compiler. A few concepts of graphics in C++ are also used. It is assumed that there is an ATM machine which is designed to perform the above mentioned tasks except Mini statement. It functions in the following sequence:

· Asks for the Pin

· If the pin is valid the user gets access to account

· After gaining access the user can perform following tasks:

1. Withdraw

2. Balance enquiry

3. Change pin

· After he has completed his transaction there is an output screen with thank you message.

· If the pin is invalid the user is denied permission to access his account.

The working of this ATM machine is in simple text mode, Easy to understand English language. Few slides with graphics in C++ are also included to give visual treat and simple interpretation and understanding. There is also a small beeping sound to give the user a feeling that some process is going on.

Materials and Methods

The Project is designed using concepts of object oriented programming. It is compiled using turbo c++ compiler. Successful completion and implementation of the project requires following requirements:

· 256 MB ram

· 1 GHz processor

· Any operating system which can run a compiler in it.

· Knowledge of the Language Used

· Expert faculty guidance.

This program is using the concept of file handling in C++.

A structure is created which contains the info about the user i.e. PIN, Account number and available balance. A class is created which contains all the functions required for functioning of the program.

The program is divided into following parts:

ATM SCREEN:

In this function the appearance of an ATM is created. That is the screen which the user sees and enters his choice.

CHECK PIN:

The File is opened and is searched for the pin that is entered if the exact match is found then the user is granted permission to access his account.

BALANCE ENQUIRY:

In this function the balance of the user is shown.

Withdraw:

In this function the user enters the amount to withdraw. If the amount is less than or equal to the amount entered by the user then the ATM performs the transaction and shows the balance after deduction of the amount withdrawn.

CHANGE PIN:

The user is asked to enter the PIN if the pin matches with the PIN in the file the user is asked to enter his new PIN.

After entering the new PIN the old PIN is replaced with this one.

ATM :

In this the ATM SCREEN function is called. This function shows the startup.

GRAPHICS:

Two screens with the concept of graphics are created in this function,

MAIN:

It is the main program and all the functions are called in the main directly or indirectly.

Apart from the above mentioned functions header files are also included to make all the elements of the program work properly.

In simple words the in this ATM simply enter your choices and see the program run .


Result


Asks for the pin

If pin entered is correct then it displays “valid user” which gives user access to his/her account


Main screen


Choice is entered by the user, in this case choice “2”


Screen showing balance.


Again main screen now the choice entered is “1”


In case of cash withdrawal it again asks for pin


User enters amount to withdraw


Telling user that transaction is in process


Showing balance


Again showing main screen but now choice entered is “3”


It asks for users old pin, then his/her new desired pin and changes are made accordingly

Pin is successfully changed

It again asks for pin

It prompts user to enter the correct pin

4 comments:

  1. please share this code... i really need it for my project in programming.

    ReplyDelete
  2. Please check your e-mail to answer my questions about price and pay method.
    Thanks

    ReplyDelete