Skip to content

Latest commit

Β 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ€ ATM SYSTEM DESIGN (C++ | OOPS | SOLID)

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.


✨ Features

πŸŽ€ Secure PIN Authentication

  • PIN verification before access
  • Card locks after 3 failed attempts

πŸŽ€ Core ATM Operations

  • Balance Inquiry
  • Deposit
  • Withdraw

πŸŽ€ Audit Trail / Mini Statement

  • Persistent transaction logging
  • Timestamped entries
  • Stored in logs/transactions.log

πŸŽ€ Transaction Logger

  • Unique transaction IDs
  • Date & time stamping
  • File-based persistence

πŸŽ€ Built-in Unit Tests

  • Deposit validation
  • Negative withdrawal protection
  • PIN lock security test
  • Tests runnable directly from the executable

πŸŽ€ Clean & Modular Architecture

  • Loosely coupled components
  • Easy to extend and maintain
  • Clear separation of concerns

✨ OOPS Concepts Used

πŸ’— 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.


✨ Project Structure

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


✨ How to Build & Run (Local)

πŸ”Ή Compile

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:

  1. Run ATM
  2. 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. πŸŽ€βœ¨

About

πŸŽ€A thoughtfully designed ATM simulation built with OOPS & SOLID principles ✨ Focused on clean architecture, extensibility, and real-world system design β€” crafted with clarity, care, and pink-powered engineering πŸŽ€

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages