Skip to content

EngineerMichael/Automatic-Teller-Machine-Simulation

Repository files navigation

ATM Simulation App in Java - README

Overview

The ATM Simulation App is a simple Java-based application that simulates the basic functionality of an Automatic Teller Machine (ATM). This app allows users to perform common ATM operations such as checking balances, withdrawing money, depositing funds, and changing PIN codes. The application also includes a basic menu-driven interface and provides simple validation for transactions.

Features

• Login System: Users can log in with an account number and PIN.

• Balance Inquiry: Users can check their account balance.

• Withdraw Money: Users can withdraw money from their account, with validation for available balance and withdrawal limits.

• Deposit Money: Users can deposit money into their account.

• Change PIN: Users can change their PIN for added security.

• Transaction History: Users can view their recent transactions.

Prerequisites

• Java: Ensure that Java is installed on your system. The application requires JDK 8 or higher.

• To check Java installation, run the command: java -version

• IDE: Use any Java-compatible Integrated Development Environment (IDE) such as IntelliJ IDEA, Eclipse, or NetBeans for development and running the application.

Installation Instructions

  1. Clone the Repository (if applicable):

git clone

  1. Download the Application Files:

Alternatively, you can download the source code as a ZIP file and extract it to your desired directory.

  1. Compile and Run:

If you’re using an IDE:

• Import the project into your IDE.

• Build and run the project using the IDE’s run configurations.

If you’re using the command line:

• Navigate to the project directory.

• Compile the Java files:

javac ATMApp.java

• Run the compiled class:

java ATMApp

Usage

Once the application is running, follow the on-screen prompts to perform ATM operations. Here’s a typical flow:

  1. Login: Enter your account number and PIN.

  2. Main Menu: After login, choose an option from the following:

• Check Balance

• Withdraw Money

• Deposit Money

• Change PIN

• Exit

  1. Transaction: Follow the prompts for each operation. For example, for withdrawing money, enter the amount you want to withdraw and confirm.

Example Usage:

Welcome to the ATM!

Please enter your account number: 123456

Enter your PIN: 1234

Main Menu:

  1. Check Balance

  2. Withdraw Money

  3. Deposit Money

  4. Change PIN

  5. Exit

Please choose an option (1-5): 1

Your current balance is: $1000.00

Please choose an option (1-5): 2

Enter withdrawal amount: 200

Transaction successful! New balance: $800.00

File Structure

/ATM-Simulation-App

├── src

│   ├── ATMApp.java      # Main class to run the ATM simulation

│   ├── ATM.java         # Class for ATM operations (balance, withdraw, deposit)

│   ├── Account.java     # Class for user account data (account number, PIN, balance)

│   └── Transaction.java # Class for handling transaction history

├── resources            # (Optional) Any resources such as images, config files

└── README.md            # This file

Class Description

• ATMApp.java: This is the main class that handles the user interface and overall flow of the ATM simulation.

• ATM.java: Contains methods for the various ATM operations such as checking balance, withdrawing, and depositing money.

• Account.java: Represents the user account, stores account number, PIN, and balance information.

• Transaction.java: Logs the transaction history (optional feature).

Example Code Snippet (ATM.java)

public class ATM {

private double balance;



public ATM(double initialBalance) {

    this.balance = initialBalance;

}



public double getBalance() {

    return balance;

}



public boolean withdraw(double amount) {

    if (amount <= balance) {

        balance -= amount;

        return true;

    } else {

        return false;

    }

}



public void deposit(double amount) {

    balance += amount;

}

}

Notes

• The ATM simulation does not involve actual banking services or a backend database.

• The account and transaction data are stored in memory and are not persistent. If the application is restarted, the data will be lost.

• You can extend this application by adding features like user authentication, database integration, or advanced transaction logging.

Contributing

If you’d like to contribute to this project, feel free to fork the repository, make your changes, and submit a pull request. Please ensure that your code adheres to the existing coding style.

License

This project is open-source and available under the GNU General Public License v3.0 .

This “ReadMe” provides users with a comprehensive guide to understand the ATM Simulation App, how to install it, and how to use it. It can be expanded with further details depending on the complexity of the application or additional features.

About

⎔ Simulation with application on Android platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages