A production-style ATM simulation built in C++ using Object-Oriented Programming and SOLID principles, focused on clean architecture, security, logging, and testability.
This project reflects real-world system design, making it a strong resume, interview, and DRDO-ready project.
- PIN verification before access
- Card locks after 3 failed attempts
- Balance Inquiry
- Deposit
- Withdraw
- Persistent transaction logging
- Timestamped entries
- Stored in
logs/transactions.log
- Unique transaction IDs
- Date & time stamping
- File-based persistence
- Deposit validation
- Negative withdrawal protection
- PIN lock security test
- Tests runnable directly from the executable
- Loosely coupled components
- Easy to extend and maintain
- Clear separation of concerns
π Encapsulation
Sensitive data like balance and PIN are protected within classes.
π Abstraction
Transaction interfaces hide internal implementation details.
π Inheritance
Deposit, Withdraw, BalanceInquiry inherit from Transaction.
π Polymorphism
ATM dynamically executes different transaction types.
π Single Responsibility Principle
Each class handles one responsibility only.
ATM-System-Design/
β
βββ src/
β βββ atm/
β βββ account/ # Account & balance logic
β βββ core/ # ATM engine & transaction logger
β βββ transaction/ # Deposit, Withdraw, Balance Inquiry
β βββ user/ # User & Card authentication
β
βββ logs/
β βββ transactions.log # Persistent audit trail
β
βββ tests/
β βββ testRunner.cpp # Unit test suite
β
βββ src/main.cpp
βββ README.md
βββ LICENSE
g++ -Isrc -Itests
src/main.cpp
src/atm/account/.cpp
src/atm/core/.cpp
src/atm/transaction/.cpp
src/atm/user/.cpp
tests/testRunner.cpp
-std=c++17 -Wall -o atm_system
πΉ Run ./atm_system
β¨ Run in the Browser (No Setup Required)
This project is fully automated for cloud execution. Click below to start:
π Run on Replit (One-Click)
(Best for quick testing)
π Open in GitHub Codespaces
(Best for deep code exploration)
β¨ Steps
π Click Create codespace on main
πWait for the environment to load (1β2 minutes)
π In the terminal, run: ./atm_system
π Choose:
1 β Run ATM
2 β Run Tests
π No compiler setup π No dependency issues π Fully reproducible environment
β¨ Running Tests
When prompted:
- Run ATM
- Run Tests
Select 2 to execute all unit tests.
β¨ Example Output [PASS] Negative Withdraw [PASS] Deposit Overflow [PASS] PIN Lock
SUMMARY: 3 passed, 0 failed
π― Interview-Level Explanation (IMPORTANT)
If asked βHow can I run your project?β, answer:
βIβve containerized the development environment using GitHub Codespaces. Anyone can open the repository, launch a codespace, and run the ATM system using a single make run command β no local dependencies required.β
π₯ This signals system design maturity, not just coding.
β¨ Why This Project?
π Practice real-world OOPS & system design π Learn secure authentication flows π Implement persistent logging & audit trails π Demonstrate testing mindset π Build a strong interview-ready project
β¨ Future Enhancements
π Multi-user support π Database-backed persistence π Admin mode & analytics π Encryption for PIN storage π CI pipeline for automated tests
β¨ UML Class Diagram
The UML class diagram below represents the core architecture of the ATM system and demonstrates inheritance, abstraction, polymorphism, and separation of concerns.
π atm-uml-class-diagram
β¨ Author
Aparna Jha π Aspiring Software Engineer | System Design & OOPS Enthusiast
πΈ Final Note
This project prioritizes clarity, correctness, extensibility, and security β exactly what interviewers and research organizations like DRDO look for.
Pink-powered. System-designed. Interview-ready. πβ¨