A comprehensive ATM (Automated Teller Machine) simulation built in Java with OOP principles.
- Account Management: Create new accounts with secure PIN authentication
- Login System: Secure login with PIN verification
- Balance Management: Check account balance and debt information
- Deposit: Add money to your account
- Withdraw: Remove money from your account (with insufficient funds protection)
- Transfer: Send money between accounts (with debt tracking for insufficient funds)
- Transaction History: Complete transaction logging and viewing
- Debt Management: Automatic debt tracking when transferring more than available balance
- Multiple Account Support: Support for multiple users
- Secure Authentication: PIN-based authentication system
- View recent transactions (last 10)
- View all transaction history
- Filter transactions by type (Deposit, Withdraw, Transfer In, Transfer Out)
- Filter transactions by date
- Detailed transaction information with timestamps
- Java 8 or higher
- Command line interface (Terminal/Command Prompt)
# If using Git
git clone <repository-url>
cd atm-cli
# Or download and extract the ZIP filecd srcjavac *.javajava ATMSimulation-
Start the Application
java ATMSimulation
-
Main Login Screen Options
1. Login- Login to existing account2. Create Account- Create new account3. View Available Accounts- See all registered accounts4. Exit- Exit the application
- Select option
2from the main menu - Enter your desired username
- Create a 4-digit PIN (numbers only)
- Confirm your PIN
- Account will be created successfully
PIN Requirements:
- Must be exactly 4 digits
- Can only contain numbers (0-9)
- Must match confirmation
- Select option
1from the main menu - Enter your username
- Enter your 4-digit PIN
- If credentials are correct, you'll access the main banking menu
Once logged in, you'll see the main banking menu:
- Select option
1 - Enter the amount to deposit
- Money will be added to your account
- Transaction will be recorded in history
- Select option
2 - Enter the amount to withdraw
- System will check if you have sufficient funds
- If successful, money will be deducted and transaction recorded
- Select option
3 - Enter the target account name
- Enter the amount to transfer
- If you have sufficient funds, full amount will be transferred
- If insufficient funds, partial transfer will occur with debt tracking
- Select option
5to enter transaction history menu - Submenu Options:
1. Show Recent Transactions- View last 10 transactions2. Show All Transactions- View complete transaction history3. Filter by Transaction Type- Filter by Deposit/Withdraw/Transfer4. Filter by Date- Filter by specific date (DD/MM/YYYY format)5. Back to Main Menu- Return to banking menu
- Select option
6 - Safely logout and return to main login screen
The system includes comprehensive error handling for:
- Invalid PIN: Wrong PIN during login
- Account Not Found: Attempting to login with non-existent account
- Insufficient Funds: Attempting to withdraw more than available balance
- Invalid Input: Non-numeric input for amounts
- Invalid Date Format: Wrong date format in transaction filtering
- Duplicate Accounts: Attempting to create account with existing username
- Invalid PIN Format: PIN not exactly 4 digits or containing non-numeric characters
- PIN Authentication: All accounts protected by 4-digit PIN
- Input Validation: All inputs are validated for type and format
- Session Management: Users must login before accessing banking operations
- Account Isolation: Users can only access their own account data