ATM Sequence Diagram and Other Diagrams Explained

Automated Teller Machines (ATMs) are essential components in modern banking systems. Understanding the various diagrams associated with ATM systems is crucial for software engineers and system designers. This article will delve into the sequence diagram, activity diagram, collaboration diagram, class diagram, and state diagram for an ATM system.

atm sequence diagram
atm sequence diagram

Sequence Diagram for ATM System

A sequence diagram illustrates how objects interact in a particular scenario of a system. For an ATM system, it captures the interactions between the user, the ATM machine, and the bank server.

ATM Sequence Diagram Example:

  1. User Authentication:
    • The user inserts their card into the ATM.
    • The ATM prompts for the PIN.
    • The user enters the PIN.
    • The ATM sends the card details and PIN to the bank server.
    • The bank server verifies the credentials and sends a response back to the ATM.
  2. Transaction Request:
    • The user selects a transaction type (e.g., withdrawal).
    • The ATM prompts for transaction details (e.g., amount).
    • The user enters the details.
    • The ATM sends the transaction request to the bank server.
    • The bank server processes the request and updates the account balance.
    • The bank server sends a response back to the ATM.
  3. Transaction Completion:
    • The ATM dispenses cash (if withdrawal) or prints a receipt.
    • The ATM prompts the user to take their card.
    • The user takes the card, and the session ends.

Sample Sequence Diagram:


Sample Sequence Diagram
Sample Sequence Diagram

ATM Activity Diagram

An activity diagram represents the flow of activities in a system. It focuses on the sequence of activities and their conditions.

Sample Activity Diagram:

  • Start
    • The user inserts their card.
    • The user enters their PIN.
    • The system validates the PIN.
      • If valid, the user proceeds.
      • If invalid, the user is prompted to re-enter the PIN or cancel.
    • The user selects a transaction type.
    • The user enters transaction details.
    • The system processes the transaction.
    • The system dispenses cash or prints a receipt.
    • The user takes their card.
  • End
Sample Activity Diagram
Sample Activity Diagram

ATM Collaboration Diagram

A collaboration diagram shows the relationships and interactions between objects in a system, emphasizing the structural organization.

Sample Collaboration Diagram:

Sample Collaboration Diagram
Sample Collaboration Diagram

ATM Class Diagram

A class diagram illustrates the static structure of a system by showing its classes, attributes, operations, and relationships among objects.

Sample Class Diagram:

ATM Class Diagram

A class diagram illustrates the static structure of a system by showing its classes, attributes, operations, and relationships among objects.

Explanation:

  • ATM Class: Manages the ATM operations and user interface.
  • Bank Server Class: Manages user authentication and transaction processing.
  • User Class: Represents the user interacting with the ATM.

Sample Class Diagram:

  • ATM Class:
    • Attributes: location, id
    • Operations: authenticate(), selectTransaction(), enterDetails(), processTransaction()
  • Bank Server Class:
    • Attributes: accountData
    • Operations: verifyCredentials(), updateBalance()
  • User Class:
    • Attributes: cardNumber, pin
    • Operations: insertCard(), enterPIN(), requestTransaction()
Sample Class Diagram
Sample Class Diagram

ATM State Diagram

A state diagram shows the different states of an object and the transitions between those states.

Sample State Diagram:

A state diagram shows the different states of an object and the transitions between those states.

Explanation:

  • The ATM starts in the idle state.
  • It transitions to various states such as “Card Inserted,” “PIN Entered,” “Transaction Selected,” “Transaction Processing,” “Transaction Complete,” and “Card Ejected.”
  • Idle
  • Card Inserted
  • PIN Entered
  • Transaction Selected
  • Transaction Processing
  • Transaction Complete
  • Card Ejected
Sample State Diagram
Sample State Diagram

Conclusion

Understanding the various diagrams involved in an ATM system is crucial for software engineers. Each diagram provides a different perspective and helps in understanding the system’s functionality and structure better. The sequence diagram focuses on interactions, the activity diagram on workflows, the collaboration diagram on relationships, the class diagram on the static structure, and the state diagram on object states. These diagrams collectively offer a comprehensive view of the ATM system, aiding in its design and implementation.

error20
fb-share-icon638
Tweet 20
fb-share-icon70
Pallavi

Author: Pallavi

Business Analyst , Functional Consultant, Provide Training on Business Analysis and SDLC Methodologies.

2 thoughts on “ATM Sequence Diagram and Other Diagrams Explained”

  1. Usually I do not read article on blogs however I would like to say that this writeup very compelled me to take a look at and do it Your writing style has been amazed me Thank you very nice article

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)