AlgoMaster Logo

Design ATM

Last Updated: February 7, 2026

Ashish

Ashish Pratap Singh

medium

In this chapter, we will explore the low-level design of ATM in detail.

Lets start by clarifying the requirements:

1. Clarifying Requirements

Before starting the design, it's important to ask thoughtful questions to uncover hidden assumptions, clarify ambiguities, and define the system's scope more precisely.

Here is an example of how a discussion between the candidate and the interviewer might unfold:

After gathering the details, we can summarize the key system requirements.

1.1 Functional Requirements

  • Authenticate users via card number and PIN
  • Support three transaction types: withdrawal, deposit, and balance inquiry
  • Dispense cash using the largest denominations first ($100, $50, $20, $10)
  • Validate both account balance and ATM cash inventory before dispensing
  • Track ATM state transitions (idle, card inserted, authenticated)
  • Simulate bank operations (authentication, balance check, debit, credit) via an in-memory service

1.2 Non-Functional Requirements

  • The design should follow object-oriented principles with clear separation of concerns
  • The system should be modular and extensible to support new transaction types and denominations
  • The code should be thread-safe for concurrent access
  • The components should be testable in isolation
  • Financial operations should follow validation-before-commit: always verify dispensability before debiting

After the requirements are clear, lets identify the core entities/objects we will have in our system.

2. Identifying Core Entities

Premium Content

This content is for premium members only.