SlideShare a Scribd company logo
ATM Machine
Simulation: C
Program
This Presentation details the creation of a C
program simulating an ATM. The program
include core features such as balance
inquires , deposits and withdrawals.
PREPARED BY:24ITJ091_RAJ PARSANIYA
24ITJ090_Merja Dharmya
CONCEPTS
• FUNCTION
• ARRAY
• STRUCTURE
• STRING
Program Overview
Purpose
• To create a user-friendly
program that replicates the
experience of using an ATM.
Functionality
• The program allows users to
check their balance, deposit
funds, and withdraw money
within specified limits.
Structure
• The program utilizes functions to
handle different ATM operations,
organized for modularity and
maintainability.
User Interaction
• The program prompts users with
clear instructions and guides
them through each transaction.
Pseudo Code for ATM Transactions
Welcome Message
• Display a welcoming message to the user, introducing the ATM service.
PIN Validation
• Prompt the user for their PIN and compare it to the stored correct PIN.
Transaction Menu
• Present a menu of available transactions to the user, such as
withdrawal, deposit, or balance inquiry.
Transaction Processing
• Based on the user's selection, perform the corresponding transaction,
updating the account balance and transaction history.
Key Functions
Check Balance()
Displays the current
account balance to the
user.
Deposit Money()
Processes the deposit
amount and updates the
account balance.
Withdraw Money()
Handles withdrawal
requests, checks sufficient
balance, and updates the
balance.
Variable Declaration and Initialization
Variable Name Data Type Description
balance
Correct PIN
Transaction Count
float
char[]
int
Stores the user's account
balance.
Stores the correct PIN for
user authentication.
Keeps track of the number of
transactions performed.
PIN Validation Function
Input PIN
• The user enters their PIN, which is stored in the input PIN array.
Comparison
• The system compares the entered PIN with the stored correct PIN
using the strcmp function.
Validation Result
• The function returns 1 if the PINs match and 0 otherwise.
Algorithm
1. Start
• Display a welcome message to the user.
2. Prompt for Card Insertion
• Wait for the user to insert the card by pressing a key.
3. PIN Validation
• Prompt the user to enter their PIN.
• Validate the entered PIN against the correct PIN ("1234").
• If the PIN is correct, proceed to the main menu. Otherwise, display "Access denied" and exit.
4. Main Menu Loop (if PIN is correct):
• Display the main menu with the following options:
• Withdraw Money
• Check Balance
• Transfer Money
• View Transaction History
• Exit
5. User Selection (based on user input):
Option 1: Withdraw Money:
• Ask the user for the amount to withdraw.
• If the amount is greater than the available balance or less than or equal to zero, display an error message.
• If the withdrawal is valid, deduct the amount from the balance, update the transaction history, and show
the new balance.
Option 2: Check Balance:
• Display the current balance.
Option 3: Transfer Money:
• Ask the user for the account details and transfer amount.
• If the transfer amount exceeds the balance or is invalid (<=0), display an error.
• If valid, deduct the transfer amount from the balance, update the transaction history, and show the new
balance.
Option 4: View Transaction History:
• Display the list of recent transactions (up to 10) showing the description and amount for
each.
• If no transactions have been made, display a message saying "No transactions made yet."
Option 5: Exit:
• Display a thank-you message and end the program
6. Repeat the Main Menu (until the user chooses to exit):
• Continue looping through the main menu until the user selects
option 5.
7. End
• Terminate the program.
Deposit and
Withdraw
Deposit
• The deposit function
prompts the user for the
amount they wish to
deposit. It validates the
input and adds the deposit
to the account balance.
Withdraw
• The withdraw function
requests the amount the
user wants to withdraw. It
checks if the account
balance is sufficient. If so, it
deducts the withdrawal
amount from the balance.
TRANSACTION HISTORY
• the transaction history feature is implemented to
keep track of recent transactions made by the user.
The program defines a structure Transaction that
holds the transaction's description (such as
"Withdrawal" or "Transfer") and the amount
involved. This information is stored in an array of
Transaction structures, with a maximum capacity to
store the last 10 transactions.
Conclusion
• This code walkthrough provides a foundational
understanding of ATM transaction processing. Further
improvements could include implementing error handling,
security enhancements, and advanced features like
account transfers.

More Related Content

PPTX
Optimizing User Experience in ATM Management Systems
PPT
CASE STUDY - THE NEXTGEN POS SYSTEM (2).ppt
DOCX
CSCE 1030 Project 2 Due 1159 PM on Sunday, March 28, 2021
PDF
PFMS.of centrl govt.pdf
PPTX
Bank Management System project
PPTX
Cpe%20ppt (1).pptx
PPT
Payment_Processing_L2_V0.1.ppt with detailed
PPTX
Payment management in SAP
Optimizing User Experience in ATM Management Systems
CASE STUDY - THE NEXTGEN POS SYSTEM (2).ppt
CSCE 1030 Project 2 Due 1159 PM on Sunday, March 28, 2021
PFMS.of centrl govt.pdf
Bank Management System project
Cpe%20ppt (1).pptx
Payment_Processing_L2_V0.1.ppt with detailed
Payment management in SAP

Similar to Computer science engineering College in t (20)

PDF
Qs2 um en_03_financial_account_to_reconciliation
PPT
Bank Management System
PPT
PPTX
FEUL TRANING OF OROMAI BANK SHARE COMPANY.pptx
PPT
vu-re-lecture-33 requirement engineering.ppt
PPT
Bank Management System
DOCX
As with all projects in this course, your program’s output wil.docx
PPTX
How Mobile Payment Apps Engage & Retain Users
PDF
What's New in Financials 2.x
PDF
Getting started with Stripe
PDF
L08-09-10 Use cases - Use case Diagram- Expanded Use Cases.pdf
PDF
Qs2 um en_10_supplier_payment_management
PPTX
ATM.pptx
PDF
How to Optimize Your Credit Card Merchant Account for Better Efficiency?
PDF
Lect14
PDF
Top Ten Features You Didn't Know About
PPTX
ATM TRASACTION SYSTEM.pptx
PPT
SRS for banking system requirement s.ppt
PPT
SRS for banking system requirement engineer.ppt
DOC
SRS on online auction system
Qs2 um en_03_financial_account_to_reconciliation
Bank Management System
FEUL TRANING OF OROMAI BANK SHARE COMPANY.pptx
vu-re-lecture-33 requirement engineering.ppt
Bank Management System
As with all projects in this course, your program’s output wil.docx
How Mobile Payment Apps Engage & Retain Users
What's New in Financials 2.x
Getting started with Stripe
L08-09-10 Use cases - Use case Diagram- Expanded Use Cases.pdf
Qs2 um en_10_supplier_payment_management
ATM.pptx
How to Optimize Your Credit Card Merchant Account for Better Efficiency?
Lect14
Top Ten Features You Didn't Know About
ATM TRASACTION SYSTEM.pptx
SRS for banking system requirement s.ppt
SRS for banking system requirement engineer.ppt
SRS on online auction system
Ad

Recently uploaded (20)

PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPT
Total quality management ppt for engineering students
PPTX
introduction to high performance computing
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PDF
Soil Improvement Techniques Note - Rabbi
PPT
Occupational Health and Safety Management System
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
UNIT - 3 Total quality Management .pptx
Nature of X-rays, X- Ray Equipment, Fluoroscopy
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Fundamentals of Mechanical Engineering.pptx
R24 SURVEYING LAB MANUAL for civil enggi
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
Information Storage and Retrieval Techniques Unit III
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Total quality management ppt for engineering students
introduction to high performance computing
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Abrasive, erosive and cavitation wear.pdf
Current and future trends in Computer Vision.pptx
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
Soil Improvement Techniques Note - Rabbi
Occupational Health and Safety Management System
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
UNIT - 3 Total quality Management .pptx
Ad

Computer science engineering College in t

  • 1. ATM Machine Simulation: C Program This Presentation details the creation of a C program simulating an ATM. The program include core features such as balance inquires , deposits and withdrawals. PREPARED BY:24ITJ091_RAJ PARSANIYA 24ITJ090_Merja Dharmya
  • 2. CONCEPTS • FUNCTION • ARRAY • STRUCTURE • STRING
  • 3. Program Overview Purpose • To create a user-friendly program that replicates the experience of using an ATM. Functionality • The program allows users to check their balance, deposit funds, and withdraw money within specified limits. Structure • The program utilizes functions to handle different ATM operations, organized for modularity and maintainability. User Interaction • The program prompts users with clear instructions and guides them through each transaction.
  • 4. Pseudo Code for ATM Transactions Welcome Message • Display a welcoming message to the user, introducing the ATM service. PIN Validation • Prompt the user for their PIN and compare it to the stored correct PIN. Transaction Menu • Present a menu of available transactions to the user, such as withdrawal, deposit, or balance inquiry. Transaction Processing • Based on the user's selection, perform the corresponding transaction, updating the account balance and transaction history.
  • 5. Key Functions Check Balance() Displays the current account balance to the user. Deposit Money() Processes the deposit amount and updates the account balance. Withdraw Money() Handles withdrawal requests, checks sufficient balance, and updates the balance.
  • 6. Variable Declaration and Initialization Variable Name Data Type Description balance Correct PIN Transaction Count float char[] int Stores the user's account balance. Stores the correct PIN for user authentication. Keeps track of the number of transactions performed.
  • 7. PIN Validation Function Input PIN • The user enters their PIN, which is stored in the input PIN array. Comparison • The system compares the entered PIN with the stored correct PIN using the strcmp function. Validation Result • The function returns 1 if the PINs match and 0 otherwise.
  • 8. Algorithm 1. Start • Display a welcome message to the user. 2. Prompt for Card Insertion • Wait for the user to insert the card by pressing a key. 3. PIN Validation • Prompt the user to enter their PIN. • Validate the entered PIN against the correct PIN ("1234"). • If the PIN is correct, proceed to the main menu. Otherwise, display "Access denied" and exit. 4. Main Menu Loop (if PIN is correct): • Display the main menu with the following options: • Withdraw Money • Check Balance • Transfer Money • View Transaction History • Exit
  • 9. 5. User Selection (based on user input): Option 1: Withdraw Money: • Ask the user for the amount to withdraw. • If the amount is greater than the available balance or less than or equal to zero, display an error message. • If the withdrawal is valid, deduct the amount from the balance, update the transaction history, and show the new balance. Option 2: Check Balance: • Display the current balance. Option 3: Transfer Money: • Ask the user for the account details and transfer amount. • If the transfer amount exceeds the balance or is invalid (<=0), display an error. • If valid, deduct the transfer amount from the balance, update the transaction history, and show the new balance.
  • 10. Option 4: View Transaction History: • Display the list of recent transactions (up to 10) showing the description and amount for each. • If no transactions have been made, display a message saying "No transactions made yet." Option 5: Exit: • Display a thank-you message and end the program 6. Repeat the Main Menu (until the user chooses to exit): • Continue looping through the main menu until the user selects option 5. 7. End • Terminate the program.
  • 11. Deposit and Withdraw Deposit • The deposit function prompts the user for the amount they wish to deposit. It validates the input and adds the deposit to the account balance. Withdraw • The withdraw function requests the amount the user wants to withdraw. It checks if the account balance is sufficient. If so, it deducts the withdrawal amount from the balance.
  • 12. TRANSACTION HISTORY • the transaction history feature is implemented to keep track of recent transactions made by the user. The program defines a structure Transaction that holds the transaction's description (such as "Withdrawal" or "Transfer") and the amount involved. This information is stored in an array of Transaction structures, with a maximum capacity to store the last 10 transactions.
  • 13. Conclusion • This code walkthrough provides a foundational understanding of ATM transaction processing. Further improvements could include implementing error handling, security enhancements, and advanced features like account transfers.