Skip to content

Santhoshabi473/ATM-Machine-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ATM Machine Simulation Project πŸ“‹ Project Overview A Java-based ATM simulation system built using Servlet, JSP, JDBC, MySQL, and HTML. This project simulates real ATM operations with user authentication, transaction processing, and session management.

πŸš€ Features βœ… User Registration (Set PIN)

βœ… Secure Login Authentication

βœ… Deposit Money

βœ… Withdraw Money

βœ… Balance Inquiry

βœ… PIN Change Facility

βœ… Session Management

βœ… Database Persistence

βœ… Responsive HTML Interface

βœ… Error Handling with Popups

πŸ› οΈ Technologies Used Backend: Java Servlet, JDBC

Frontend: HTML, JSP, JavaScript

Database: MySQL

Server: Apache Tomcat

IDE: NetBeans (Recommended)

Build Tool: Maven (Standard)

πŸ“ Project Structure text ATM_Simulation_Project/ β”‚ β”œβ”€β”€ src/main/java/ β”‚ └── setpin.java # Main Servlet handling all operations β”‚ β”œβ”€β”€ src/main/webapp/ β”‚ β”œβ”€β”€ index.html # Home page with options β”‚ β”œβ”€β”€ setpin.html # User registration page β”‚ β”œβ”€β”€ atm.html # Login page β”‚ β”œβ”€β”€ atmoperation.html # Operations menu β”‚ β”œβ”€β”€ deposit.html # Deposit form β”‚ β”œβ”€β”€ withdraw.html # Withdraw form β”‚ β”œβ”€β”€ balance.html # Balance check form β”‚ β”œβ”€β”€ changepin.html # Change PIN form β”‚ └── WEB-INF/ β”‚ └── web.xml # Servlet configuration β”‚ β”œβ”€β”€ database/ β”‚ └── atm_database.sql # Database schema β”‚ β”œβ”€β”€ lib/ # JDBC driver (mysql-connector-java-8.0.xx.jar) β”œβ”€β”€ README.md # This file └── pom.xml # Maven configuration πŸ—„οΈ Database Setup

  1. Create Database sql CREATE DATABASE atmmachine; USE atmmachine;
  2. Create Users Table sql CREATE TABLE setpin ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, pin VARCHAR(6) NOT NULL, cpin VARCHAR(6) NOT NULL, balance DECIMAL(10,2) DEFAULT 0.00, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
  3. (Optional) Create Transactions Table sql CREATE TABLE transactions ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, transaction_type VARCHAR(20), amount DECIMAL(10,2), balance_after DECIMAL(10,2), transaction_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES setpin(id) ); βš™οΈ Installation & Setup Prerequisites Java JDK 8 or higher

Apache Tomcat 9 or higher

MySQL 5.7 or higher

NetBeans IDE (or Eclipse/IntelliJ)

MySQL Connector/J driver

Step 1: Clone/Download Project bash git clone https://github.com/yourusername/atm-simulation.git Step 2: Database Configuration Start MySQL server

Execute atm_database.sql script

Update database credentials in setpin.java:

java return DriverManager.getConnection( "jdbc:mysql://localhost:3306/atmmachine", "root", "yourpassword" ); Step 3: Configure Project in IDE NetBeans:

File β†’ New Project β†’ Java Web β†’ Web Application

Copy files to respective folders

Add MySQL Connector to Libraries

Eclipse:

File β†’ New β†’ Dynamic Web Project

Copy files to WebContent folder

Add MySQL Connector to Build Path

Step 4: Deploy and Run Build the project

Deploy to Tomcat server

Access application: http://localhost:8080/ATM_Simulation/

πŸ“Š Application Flow Home Page (index.html) β†’ Choose Set PIN or ATM Operations

Registration (setpin.html) β†’ Create account with name and PIN

Login (atm.html) β†’ Enter credentials for authentication

Operations Menu (atmoperation.html) β†’ Choose transaction type

Perform Operations β†’ Deposit/Withdraw/Balance/Change PIN

Logout β†’ Session destroyed, return to home

πŸ”’ Security Features Password hashing (if implemented in future)

Session-based authentication

SQL injection prevention using PreparedStatement

Input validation on client and server side

Automatic session timeout

πŸ§ͺ Testing the Application Test Cases: User Registration:

Enter valid credentials β†’ Success popup

Mismatched PINs β†’ Error message

Duplicate username β†’ Error message

Login:

Valid credentials β†’ Welcome message

Invalid credentials β†’ Error message

Transactions:

Deposit positive amount β†’ Balance increases

Withdraw within limit β†’ Balance decreases

Withdraw exceeding balance β†’ Error message

Balance check β†’ Display current balance

PIN change with verification β†’ Success message

πŸ› Troubleshooting Issue Solution 404 Error Check servlet mapping in web.xml Database Connection Failed Verify MySQL credentials and service Session not working Check session attribute names match Popups not showing Enable JavaScript in browser Tomcat deployment error Clean and rebuild project πŸ“ˆ Future Enhancements Add transaction history

Implement email/SMS notifications

Add admin panel for user management

Implement biometric authentication

Add multi-language support

Create mobile-responsive design

Implement REST API version

πŸ‘₯ Contributor Guidelines Fork the repository

Create a feature branch (git checkout -b feature/AmazingFeature)

Commit changes (git commit -m 'Add AmazingFeature')

Push to branch (git push origin feature/AmazingFeature)

Open a Pull Request

πŸ“„ License This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments Java Servlet Documentation

MySQL Official Documentation

Apache Tomcat Team

All contributors and testers

πŸ“§ Contact Developer: SANTHOSH M Email: santhosh473abi@gmail.com GitHub: https://github.com/Santhoshabi473

⭐ If you find this project useful, please give it a star! ⭐

πŸš€ Quick Start Commands For Windows: bash

Start MySQL

net start mysql

Start Tomcat

catalina start

Access application

start http://localhost:8080/ATM_Simulation/ For Linux/Mac: bash

Start MySQL

sudo systemctl start mysql

Start Tomcat

./catalina.sh start

MySQL Connector/J

Happy Coding! 🎯

About

A comprehensive banking simulation system that replicates real-world ATM functionality with secure user authentication, transaction processing, and account management capabilities. Built using Java Enterprise technologies, this project demonstrates core banking operations in a web-based environment. To See Demo πŸ‘‡

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors