A comprehensive console-based ATM simulation built in Java, demonstrating Object-Oriented Programming principles with persistent data storage.
- Features
- Technologies Used
- Prerequisites
- Installation
- Usage
- Project Structure
- Class Architecture
- File Storage
- Screenshots
- Contributing
- License
- ๐ฐ 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
- Java 11+ (uses
String.repeat()method) - File I/O for data persistence
- Object-Oriented Programming principles
- Collections Framework (ArrayList)
- Java Time API for timestamps
- Java JDK 11 or higher installed on your system
- Command line interface (Terminal/Command Prompt)
- Text editor or IDE (optional but recommended)
java -version
javac -versionIf you need to install Java, download from:
-
Clone the repository
git clone https://github.com/yourusername/mini-atm-simulation.git cd mini-atm-simulation -
Compile the Java file
javac ATMSimulation.java
-
Run the application
java ATMSimulation
-
Start the application
java ATMSimulation
-
Enter your credentials
- Account Number: Enter any account number
- Account Holder Name: Enter your name
-
Use ATM features
- Select from the main menu (1-5)
- Follow on-screen prompts
- Data is automatically saved after each transaction
**************************************************
* 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):
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
- Represents individual transactions
- Stores transaction type, amount, timestamp, and resulting balance
- Provides formatted string representation
- Manages account operations and data
- Handles file I/O for balance and transaction persistence
- Validates deposits and withdrawals
- Maintains transaction history
- Manages user interface and interactions
- Handles menu navigation and user input
- Provides formatted display for all operations
- Includes input validation and error handling
- Main application entry point
- Initializes and starts the ATM system
The application uses two files for data persistence:
balance.txt: Stores the current account balancetransactions.txt: Stores complete transaction history with timestamps
These files are automatically created and updated with each transaction.
========================================
ATM MAIN MENU
========================================
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Transaction History
5. Exit
========================================
----------------------------------------------------------------------
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
----------------------------------------------------------------------
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
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
- Transaction history shows only basic formatting in console
- No data encryption for stored files
- Single account support only
- Multi-account support
- PIN-based authentication
- Account-to-account transfers
- Transaction limits
- GUI interface
- Database integration
- Network connectivity for remote ATM access
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!