Skip to content

SSLogaprasath/ATMSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง Mini ATM Simulation

A comprehensive console-based ATM simulation built in Java, demonstrating Object-Oriented Programming principles with persistent data storage.

๐Ÿ“‹ Table of Contents

โœจ Features

  • ๐Ÿ’ฐ Balance Inquiry: Check current account balance
  • ๐Ÿ“ฅ Deposit Money: Add funds to your account with validation
  • ๐Ÿ“ค Withdraw Money: Remove funds with insufficient balance protection
  • ๐Ÿ“Š Transaction History: View detailed transaction records with timestamps
  • ๐Ÿ’พ Data Persistence: Account balance and transaction history saved to files
  • ๐Ÿ” User Authentication: Simple account verification system
  • โœ… Input Validation: Robust error handling for all user inputs
  • ๐ŸŽจ Professional UI: Clean, formatted console interface

๐Ÿ› ๏ธ Technologies Used

  • Java 11+ (uses String.repeat() method)
  • File I/O for data persistence
  • Object-Oriented Programming principles
  • Collections Framework (ArrayList)
  • Java Time API for timestamps

๐Ÿ“‹ Prerequisites

  • Java JDK 11 or higher installed on your system
  • Command line interface (Terminal/Command Prompt)
  • Text editor or IDE (optional but recommended)

Checking Java Version

java -version
javac -version

If you need to install Java, download from:

๐Ÿš€ Installation

  1. Clone the repository

    git clone https://github.com/yourusername/mini-atm-simulation.git
    cd mini-atm-simulation
  2. Compile the Java file

    javac ATMSimulation.java
  3. Run the application

    java ATMSimulation

๐Ÿ’ป Usage

  1. Start the application

    java ATMSimulation
  2. Enter your credentials

    • Account Number: Enter any account number
    • Account Holder Name: Enter your name
  3. Use ATM features

    • Select from the main menu (1-5)
    • Follow on-screen prompts
    • Data is automatically saved after each transaction

Sample Session

**************************************************
*            WELCOME TO MINI ATM            *
**************************************************

Enter Account Number: 12345
Enter Account Holder Name: John Doe

Authentication successful!
Welcome, John Doe!
----------------------------------------

========================================
           ATM MAIN MENU
========================================
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Transaction History
5. Exit
========================================
Please select an option (1-5): 

๐Ÿ“ Project Structure

mini-atm-simulation/
โ”‚
โ”œโ”€โ”€ ATMSimulation.java      # Main application file
โ”œโ”€โ”€ balance.txt            # Stores current balance (auto-generated)
โ”œโ”€โ”€ transactions.txt       # Stores transaction history (auto-generated)
โ”œโ”€โ”€ README.md             # Project documentation
โ””โ”€โ”€ .gitignore           # Git ignore file

๐Ÿ—๏ธ Class Architecture

๐Ÿ”น Transaction Class

  • Represents individual transactions
  • Stores transaction type, amount, timestamp, and resulting balance
  • Provides formatted string representation

๐Ÿ”น Account Class

  • Manages account operations and data
  • Handles file I/O for balance and transaction persistence
  • Validates deposits and withdrawals
  • Maintains transaction history

๐Ÿ”น ATM Class

  • Manages user interface and interactions
  • Handles menu navigation and user input
  • Provides formatted display for all operations
  • Includes input validation and error handling

๐Ÿ”น ATMSimulation Class

  • Main application entry point
  • Initializes and starts the ATM system

๐Ÿ’พ File Storage

The application uses two files for data persistence:

  • balance.txt: Stores the current account balance
  • transactions.txt: Stores complete transaction history with timestamps

These files are automatically created and updated with each transaction.

๐Ÿ“ธ Screenshots

Main Menu

========================================
           ATM MAIN MENU
========================================
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Transaction History
5. Exit
========================================

Transaction History

----------------------------------------------------------------------
                    TRANSACTION HISTORY
----------------------------------------------------------------------
Type       | Amount   | Date & Time         | Balance After
----------------------------------------------------------------------
DEPOSIT    |   500.00 | 2024-01-15 10:30:25 | Balance: $500.00
WITHDRAW   |   100.00 | 2024-01-15 11:45:10 | Balance: $400.00
DEPOSIT    |   250.00 | 2024-01-15 14:20:35 | Balance: $650.00
----------------------------------------------------------------------

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Contribution Ideas

  • Add PIN-based authentication
  • Implement multiple account support
  • Add account transfer functionality
  • Create GUI version using JavaFX/Swing
  • Add unit tests
  • Implement encryption for data files
  • Add transaction limits and daily withdrawal limits

๐Ÿ“ License

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

๐ŸŽ“ Learning Objectives

This project demonstrates:

  • Object-Oriented Programming concepts (Encapsulation, Inheritance, Polymorphism)
  • File I/O operations in Java
  • Exception handling and input validation
  • Collections Framework usage
  • Java Time API for timestamp management
  • Console application development
  • Data persistence techniques

๐Ÿ› Known Issues

  • Transaction history shows only basic formatting in console
  • No data encryption for stored files
  • Single account support only

๐Ÿ”ฎ Future Enhancements

  • Multi-account support
  • PIN-based authentication
  • Account-to-account transfers
  • Transaction limits
  • GUI interface
  • Database integration
  • Network connectivity for remote ATM access

๐Ÿ“ž Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check existing issues for solutions
  • Review the code comments for implementation details

Made with โค๏ธ by [Your Name]

Don't forget to โญ star this repository if you found it helpful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages