ATM System
Card authentication, withdrawals with note dispensing, and bank integration.
Medium45 minState patternChain of ResponsibilityTransactions
Design the software for an ATM: card insertion, PIN authentication, balance enquiry, cash withdrawal with note dispensing, and deposits. It combines a State machine for the session with Chain of Responsibility for dispensing notes, plus careful thinking about failures between the ATM and the bank.
Requirements
Functional
- Insert card, enter PIN (3 attempts, then retain the card / block).
- Operations: balance enquiry, withdraw cash, deposit cash, change PIN, mini statement.
- Withdrawal: amount must be a multiple of Rs 100 and within daily limits; the ATM must be able to dispense it with available notes.
- Dispense using Rs 2000, 500, 200, 100 notes, minimising note count.
- Print or display receipts; eject card at session end.
Non-functional
- Money must never be lost or double-debited, even if the ATM crashes mid-transaction.
- The bank is a remote system; network calls can time out.
- Session timeouts for inactivity.
- Hardware components (card reader, keypad, dispenser, printer) are behind interfaces.
Try it first
Set a timer, sketch your own design on paper, then compare it with the reference walkthrough.
45:00
Defend it out loud
The AI interviewer will probe your design for ATM System and score it.