Skip to content

Jeremiamichael/atm-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ATM CLI Simulation

A comprehensive ATM (Automated Teller Machine) simulation built in Java with OOP principles.

Features

Core Banking Operations

  • 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)

Advanced Features

  • 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

Transaction History Features

  • 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

System Requirements

  • Java 8 or higher
  • Command line interface (Terminal/Command Prompt)

Installation and Setup

1. Clone or Download the Project

# If using Git
git clone <repository-url>
cd atm-cli

# Or download and extract the ZIP file

2. Navigate to Source Directory

cd src

3. Compile the Java Files

javac *.java

4. Run the Application

java ATMSimulation

Usage Instructions

Getting Started

  1. Start the Application

    java ATMSimulation
  2. Main Login Screen Options

    • 1. Login - Login to existing account
    • 2. Create Account - Create new account
    • 3. View Available Accounts - See all registered accounts
    • 4. Exit - Exit the application

Creating a New Account

  1. Select option 2 from the main menu
  2. Enter your desired username
  3. Create a 4-digit PIN (numbers only)
  4. Confirm your PIN
  5. Account will be created successfully

PIN Requirements:

  • Must be exactly 4 digits
  • Can only contain numbers (0-9)
  • Must match confirmation

Logging In

  1. Select option 1 from the main menu
  2. Enter your username
  3. Enter your 4-digit PIN
  4. If credentials are correct, you'll access the main banking menu

Banking Operations

Once logged in, you'll see the main banking menu:

1. Deposit Money

  • Select option 1
  • Enter the amount to deposit
  • Money will be added to your account
  • Transaction will be recorded in history

2. Withdraw Money

  • 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

3. Transfer Money

  • 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

4. Transaction History

  • Select option 5 to enter transaction history menu
  • Submenu Options:
    • 1. Show Recent Transactions - View last 10 transactions
    • 2. Show All Transactions - View complete transaction history
    • 3. Filter by Transaction Type - Filter by Deposit/Withdraw/Transfer
    • 4. Filter by Date - Filter by specific date (DD/MM/YYYY format)
    • 5. Back to Main Menu - Return to banking menu

5. Logout

  • Select option 6
  • Safely logout and return to main login screen

Error Handling

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

Security Features

  • 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

About

ATM CLI test for Dkatalis Internship

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages