Skip to content

MohamedShiras/ATMManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง ATM Management System

Status Java License Platform

A comprehensive Automated Teller Machine (ATM) Management System implemented in Java. This console-based application simulates real-world ATM operations with secure banking functionalities including account management, transactions, and balance inquiries.


๐Ÿ“‹ Table of Contents


๐Ÿง  Overview

The ATM Management System is a Java-based application that replicates the functionality of a real Automated Teller Machine. It provides a secure, user-friendly interface for performing various banking operations without the need for physical bank visits.

Key Highlights

  • โœ… Secure Authentication - PIN-based account access
  • โœ… Account Management - Create, update, and manage accounts
  • โœ… Transaction Processing - Withdrawals, deposits, and transfers
  • โœ… Balance Inquiry - Real-time account balance checking
  • โœ… Transaction History - Detailed record of all operations
  • โœ… Multi-Account Support - Handle multiple user accounts
  • โœ… Data Persistence - File-based or database storage

โœจ Features

User Operations

๐Ÿ” Authentication & Security

  • Secure PIN-based login system
  • Account number validation
  • Session management
  • Multiple failed login attempt handling
  • PIN change functionality

๐Ÿ’ฐ Banking Transactions

  • Cash Withdrawal - Withdraw money with balance validation
  • Cash Deposit - Deposit funds into account
  • Fund Transfer - Transfer money between accounts
  • Balance Inquiry - Check current account balance
  • Mini Statement - View recent transaction history

๐Ÿ‘ค Account Management

  • Create new account
  • View account details
  • Update personal information
  • Change PIN/Password
  • Close account

Administrative Features

  • View all accounts
  • Generate reports
  • Monitor transactions
  • Account activation/deactivation
  • System logs and audit trails

๐Ÿ—๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         User Interface              โ”‚
โ”‚      (Console/Terminal I/O)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Authentication Layer           โ”‚
โ”‚    (Login & Security Management)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Business Logic Layer           โ”‚
โ”‚  (Transaction Processing & Rules)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Data Access Layer              โ”‚
โ”‚   (File I/O / Database Operations)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Data Storage                   โ”‚
โ”‚    (Files / Database)               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Technologies Used

Java OOP Console

  • Programming Language: Java (JDK 8 or higher)
  • Design Pattern: Object-Oriented Programming (OOP)
  • Data Storage: File System / MySQL Database
  • Development Approach: Console-based Application
  • Build Tool: Maven (optional) or direct compilation

Core Java Concepts Used

  • Classes and Objects
  • Inheritance and Polymorphism
  • Encapsulation and Abstraction
  • Exception Handling
  • File I/O Operations
  • Collections Framework
  • Date and Time API

๐Ÿ“ Project Structure

ATM-Management-System/
โ”œโ”€โ”€ ATM-Management/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ATMSystem.java              # Main application entry point
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Account.java                # Account entity class
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ User.java                   # User entity class
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Transaction.java            # Transaction class
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Authentication.java         # Login/security handler
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AccountManager.java         # Account operations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ TransactionManager.java     # Transaction processing
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DatabaseHandler.java        # Data persistence
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Utilities.java              # Helper methods
โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚       โ””โ”€โ”€ ATMSystemTest.java          # Unit tests
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ accounts.dat                    # Account data file
โ”‚   โ”‚   โ”œโ”€โ”€ transactions.dat                # Transaction records
โ”‚   โ”‚   โ””โ”€โ”€ users.dat                       # User information
โ”‚   โ”œโ”€โ”€ docs/
โ”‚   โ”‚   โ”œโ”€โ”€ design-document.md
โ”‚   โ”‚   โ””โ”€โ”€ user-manual.md
โ”‚   โ””โ”€โ”€ lib/                                # External libraries (if any)
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE

๐Ÿš€ Getting Started

Prerequisites

Ensure you have the following installed on your system:

  • Java Development Kit (JDK) 8 or higher
  • IDE (Optional but recommended)
    • IntelliJ IDEA
    • Eclipse
    • NetBeans
    • VS Code with Java extension
  • Git for version control

Installation

  1. Clone the Repository
git clone https://github.com/mohamedshiras/ATM-Management-System.git
cd ATM-Management-System
  1. Navigate to Source Directory
cd ATM-Management/src
  1. Compile the Java Files
javac *.java

Or if using package structure:

javac -d ../bin main/*.java

Running the Application

Method 1: Direct Execution

java ATMSystem

Method 2: Using IDE

  1. Open the project in your preferred IDE
  2. Locate the ATMSystem.java file (main class)
  3. Right-click and select "Run"

Method 3: Using JAR (if packaged)

java -jar ATM-Management-System.jar

๐Ÿ’ก Usage Guide

First Time Setup

  1. Launch the Application

    Welcome to ATM Management System
    ================================
    
  2. Create New Account

    • Select "Create New Account" from main menu
    • Enter required details:
      • Full Name
      • Date of Birth
      • Address
      • Phone Number
      • Email
      • Initial Deposit
      • Set PIN (4-6 digits)
    • Account number will be auto-generated
  3. Login to Your Account

    • Enter Account Number
    • Enter PIN
    • Access granted upon successful authentication

Performing Transactions

Cash Withdrawal

1. Select "Withdraw" from menu
2. Enter amount to withdraw
3. Confirm transaction
4. Collect virtual cash
5. Receipt displayed

Cash Deposit

1. Select "Deposit" from menu
2. Enter amount to deposit
3. Confirm transaction
4. Balance updated
5. Receipt displayed

Fund Transfer

1. Select "Transfer" from menu
2. Enter beneficiary account number
3. Enter transfer amount
4. Confirm transaction
5. Both accounts updated
6. Receipt displayed

Check Balance

1. Select "Balance Inquiry"
2. Current balance displayed
3. Option to print mini statement

๐Ÿ”ง Core Functionalities

1. Account Creation

Account newAccount = new Account(
    accountNumber,
    customerName,
    pin,
    initialBalance,
    dateOfBirth,
    address,
    phoneNumber
);

Features:

  • Auto-generated unique account number
  • Minimum balance validation
  • Age verification (18+ years)
  • Input sanitization

2. Authentication System

boolean authenticate(String accountNumber, String pin) {
    // Verify account exists
    // Validate PIN
    // Check account status (active/frozen)
    // Log login attempt
    return isAuthenticated;
}

Security Measures:

  • Encrypted PIN storage
  • Maximum 3 login attempts
  • Account lockout after failed attempts
  • Session timeout

3. Transaction Processing

Transaction processWithdrawal(double amount) {
    // Check sufficient balance
    // Validate withdrawal limits
    // Update account balance
    // Create transaction record
    // Return transaction details
}

Validations:

  • Balance sufficiency check
  • Daily withdrawal limit
  • Minimum balance maintenance
  • Transaction limits

4. Data Persistence

File-Based Storage:

// Save account to file
void saveAccount(Account account) {
    ObjectOutputStream out = new ObjectOutputStream(
        new FileOutputStream("accounts.dat", true)
    );
    out.writeObject(account);
    out.close();
}

Database Storage (if implemented):

CREATE TABLE accounts (
    account_number VARCHAR(20) PRIMARY KEY,
    customer_name VARCHAR(100),
    pin_hash VARCHAR(64),
    balance DECIMAL(15,2),
    created_date TIMESTAMP,
    status VARCHAR(20)
);

๐Ÿ”’ Security Features

1. PIN Management

  • Encryption: PINs stored using hash algorithms (SHA-256)
  • Validation: 4-6 digit numeric PIN requirement
  • Change PIN: Secure PIN update functionality
  • Verification: PIN re-entry for confirmation

2. Transaction Security

  • Authentication: Required for all operations
  • Authorization: Account ownership verification
  • Audit Trail: All transactions logged
  • Limits: Daily transaction limits enforced

3. Session Management

  • Auto-logout: Inactive session timeout (5 minutes)
  • Single Session: One active session per account
  • Secure Exit: Proper logout procedure

4. Input Validation

  • Sanitization: Prevention of SQL injection
  • Type Checking: Numeric/String validation
  • Range Validation: Amount limits
  • Format Verification: Account number format

๐Ÿ’พ Database Design

Entity-Relationship Model

ACCOUNT
โ”œโ”€โ”€ account_number (PK)
โ”œโ”€โ”€ customer_name
โ”œโ”€โ”€ pin_hash
โ”œโ”€โ”€ balance
โ”œโ”€โ”€ account_type
โ”œโ”€โ”€ created_date
โ”œโ”€โ”€ last_modified
โ””โ”€โ”€ status

USER
โ”œโ”€โ”€ user_id (PK)
โ”œโ”€โ”€ account_number (FK)
โ”œโ”€โ”€ name
โ”œโ”€โ”€ dob
โ”œโ”€โ”€ address
โ”œโ”€โ”€ phone
โ”œโ”€โ”€ email
โ””โ”€โ”€ id_proof

TRANSACTION
โ”œโ”€โ”€ transaction_id (PK)
โ”œโ”€โ”€ account_number (FK)
โ”œโ”€โ”€ transaction_type
โ”œโ”€โ”€ amount
โ”œโ”€โ”€ balance_after
โ”œโ”€โ”€ timestamp
โ””โ”€โ”€ description

๐Ÿงช Testing

Manual Testing Checklist

  • Account creation with valid data
  • Account creation with invalid data
  • Login with correct credentials
  • Login with incorrect credentials (3 attempts)
  • Withdrawal with sufficient balance
  • Withdrawal exceeding balance
  • Deposit with valid amount
  • Fund transfer between accounts
  • Balance inquiry
  • Transaction history display
  • PIN change functionality
  • Session timeout

Running Unit Tests

If using JUnit:

javac -cp .:junit-4.13.2.jar ATMSystemTest.java
java -cp .:junit-4.13.2.jar:hamcrest-core-1.3.jar org.junit.runner.JUnitCore ATMSystemTest

๐Ÿ”ฎ Future Enhancements

Planned Features

  • GUI Interface - JavaFX or Swing-based graphical interface
  • Mobile App Integration - Android/iOS companion app
  • Biometric Authentication - Fingerprint/face recognition
  • Multi-Currency Support - Handle different currencies
  • Card Management - Virtual card generation
  • Bill Payment - Utility bill payment integration
  • Loan Services - Apply for loans
  • Investment Options - Fixed deposits, mutual funds
  • Notifications - Email/SMS alerts for transactions
  • Analytics Dashboard - Spending analysis and reports
  • Multi-Language Support - Internationalization
  • QR Code Transactions - Scan and pay functionality
  • ATM Locator - Find nearest ATM

Technical Improvements

  • Migrate to Spring Boot for better architecture
  • Implement RESTful API
  • Add database migration tools (Flyway/Liquibase)
  • Implement caching (Redis)
  • Add comprehensive logging (Log4j)
  • Containerization with Docker
  • CI/CD pipeline setup
  • Performance optimization
  • Load testing and stress testing

๐Ÿค Contributing

Contributions are welcome and appreciated! Here's how you can contribute:

How to Contribute

  1. Fork the Repository

    Click the 'Fork' button at the top right of the page
  2. Clone Your Fork

    git clone https://github.com/YOUR-USERNAME/ATM-Management-System.git
    cd ATM-Management-System
  3. Create a Feature Branch

    git checkout -b feature/AmazingFeature
  4. Make Your Changes

    • Write clean, well-documented code
    • Follow Java naming conventions
    • Add comments where necessary
    • Update README if needed
  5. Commit Your Changes

    git add .
    git commit -m "Add some AmazingFeature"
  6. Push to Your Fork

    git push origin feature/AmazingFeature
  7. Open a Pull Request

    • Go to the original repository
    • Click "New Pull Request"
    • Select your feature branch
    • Describe your changes
    • Submit the PR

Contribution Guidelines

  • Follow existing code style and conventions
  • Write meaningful commit messages
  • Add unit tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR
  • Be respectful and constructive in discussions

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2026 Mohamed Shiras

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

๐Ÿ‘ฅ Contributors

Project Lead

Special Thanks

  • Contributors who have helped improve this project
  • The Java community for excellent documentation
  • All users providing valuable feedback

๐Ÿ“ง Contact

Mohamed Shiras


๐Ÿ™ Acknowledgments

  • Inspired by real-world ATM systems
  • Built as a learning project to understand Java OOP concepts
  • Thanks to the open-source community for guidance and support
  • Java documentation and tutorials

๐Ÿ“š Additional Resources

Learning Resources

Related Projects

  • Online Banking System
  • Point of Sale (POS) System
  • Credit Card Management System
  • Digital Wallet Application

โญ If you find this project helpful, please consider giving it a star! โญ

Made with โ˜• and โค๏ธ by Mohamed Shiras

About

A Simple Automated Teller Machine, Implemented using Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages