Vehicle Management System Project In Java With Source Code
The Vehicle Management System Project In Java was developed in JAVA Programming using NetBeans IDE, we created this Java Project with Source Code.
It is designed using Graphical User Interface (GUI), and this project was built in Java using Microsoft Access as the backend database and SQL for queries.
A Vehicle Service Management System Project In Java’s aim is to develop an offline application that could manage vehicles, drivers as well as the passengers could book the rides.
About The Vehicle Management System In Java
Project Name: | Vehicle Management System |
Language/s Used: | JAVA |
Database: | MySQL |
Type: | Desktop/web Application |
Developer: | IT SOURCECODE |
Updates: | 0 |
There are mainly 5 modules in this project
- Vehicle Management – Admin can add new vehicles, and manage them.
- Driver Management – A new driver can sign up, pick up the kind of vehicle he drives and he’ll be alloted a vehicle according to his selection. He can then turn his status online and start picking rides.
- Passenger Management – New passengers can sign up and login into the system to book rides. They can book a ride, and check their current rides and also past rides.
- Rides Management – Admin can manage the rides going on. An admin can even ban a driver.
- Booking Ride – Ride booking is done by the passengers where they can choose from 3 types of vehicles i.e. Bus, Rickshaw, and Car. They have to select the routes and begin traveling.
This JAVA Project also includes a Simple Project In Java NetBeans With Source Code for free, just find the downloadable source code below and click to start downloading.
To start executing a Vehicle Management System Project In Java With Source Code, make sure that you have NetBeans IDE or any platform of Java installed on your computer.
Vehicle Management System Project In Java With Source Code: Steps on how to run the project
Time needed: 5 minutes
These are the steps on how to run a Vehicle Management System Project In Java With Source Code
- Step 1: Download the source code.
First, download the source code given below.
- Step 2: Extract file.
Second, after you finish downloading the source code, extract the zip file.
- Step 3: Open Netbeans.
Third, open “Netbeans IDE”.
- Step 4: Click open project.
Fourth, click Open Project and choose your download source code.
- Step 5: Run the project.
Fifth, right-click the project folder and click run.
The code given below is for the connection under Java and MS Access
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package vehler; /** * * @author user */ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author Muaaz */ public class DbConnection { private static Connection connection = null; PreparedStatement pst = null; ResultSet rst = null; public Connection OpenConnection (){ String dataSourceName = "DataBase/try2.accdb"; String dir = System.getProperty("user.dir"); String url = "jdbc:ucanaccess://" + dir + "/" + dataSourceName; connection = null; try{ connection = DriverManager.getConnection(url); }catch(Exception e){ System.out.println(e); } return connection; } public ResultSet GetData(String Sql)// this method is used for Select Statement { try { pst = connection.prepareStatement(Sql); rst = pst.executeQuery(); } catch (SQLException ex) { JOptionPane.showMessageDialog(null, ex + "\nDbConnection GetData Error"); } return rst; } public int InsertUpdateDelete(String Sql)// this method is used for InsertUpdateDelete Statement { int flag=0; try { pst = connection.prepareStatement(Sql); flag = pst.executeUpdate(); } catch (SQLException ex) { } return flag ; } public void CloseConnection(){ if (rst != null) { try { rst.close(); } catch (SQLException e) { /* ignored */} } if (pst != null) { try { pst.close(); } catch (SQLException e) { /* ignored */} } if (connection != null) { try { connection.close(); } catch (SQLException e) { /* ignored */} } } }
In this module which is the class for the connection under java and microsoft access database.
The code given below is for the admin module
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package vehler; /** * * @author user */import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; public class Admin { /** * @param args the command line arguments */ DbConnection conn = new DbConnection(); PreparedStatement pst = null; ResultSet rst = null; public void changePassword(String username,String newPassword) { int flag; try{ conn.OpenConnection(); String sql = "UPDATE Admint SET AdminP = '"+ newPassword +"' where AdminID = '"+username+ "'"; flag = conn.InsertUpdateDelete(sql); if(flag == 1){ JOptionPane.showMessageDialog(null, "YOUR PASSWORD HAS BEEN CHANGED "); } else{ JOptionPane.showMessageDialog(null, "YOUR PASSWORD COULDn't BE CHANGED" ); } } catch(Exception e){ JOptionPane.showMessageDialog(null, "UpdatePassword Query Failed"); } } public boolean chkAdminPass(String id, String pass){ boolean flag = false; try{ conn.OpenConnection(); String sql = "Select AdminID,AdminP from AdminT where AdminID = '" + id + "' and AdminP = '" + pass + "'"; rst= conn.GetData(sql); if(rst.next()){ flag= true; } else flag= false; conn.CloseConnection(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e+"\nInavlid Username or Password"); } return flag; } public ResultSet RideRealTimeCombined() { ResultSet rst1=null; try{ conn.OpenConnection(); String sql = "Select Datee,Username,VehiclePlate,PUsername,Fromm,Too,StartTime,EndTime,RideStatus,BillStatus,Bill,NoOfPassengers from RideRealtime "; rst1= conn.GetData(sql); do{ return rst1; } while(rst1.next()); } catch(Exception e){ JOptionPane.showMessageDialog(null, e+"\nRide Realtime Combined Error"); } conn.CloseConnection(); return null; } }
In this module which is the class for the administrator.
Output:
Downloadable Source Code Below
Anyway, if you want to level up your programming knowledge, especially Java, try this new article I’ve made for you Best Java Projects With Source Code For Beginners Free Download.
Summary
The Java Project With Source Code is built fully in Java and MySQL Database. It has a full-featured Graphical User Interface (GUI) with all the functionalities.
This Article is a way to enhance and develop our skills and logic ideas which is important in practicing the Java programming language which is the most well-known and most usable programming language in many companies.
This Simple Project also includes a downloadable source code for free.
Related articles below
- Load data from MySQL database to Combo box Using Java
- How to use Scanner in Java Tutorial Using Netbeans IDE
- Update Data using MySQL Database and Java with Netbeans IDE
- Join Two String Value using MySQL CONCAT Function in Java
- How to convert text to speech in Java Tutorial using Netbeans IDE
- How to Load data from Mysql Database to Table Element Using Java
Inquiries
If you have any questions or suggestions about the Vehicle Management System Project In Java With Source Code, please feel free to leave a comment below.
The code is not downloading
if you can’t download the source code, please try to use different browser and try to download it again, thank you.
I want the pdf of vehicle management of er diagram ,flowchart , coding,backend,forntend etc
So far we don’t have the pdf of vehicle
what’s the admin password and username?
Hey ,have you find the admin password or username? or edited any files?If yes please reply me.I want your help.if you get the message please reply me on [email protected]
kindly waiting for your reply
Sir what is default user name id and passowrd,please sir reply me as soon as posssible.Tomorrow is presentation.
it is inside in the sql database for the id and password
How to run it as a local web application. Kindly suggest
You can run in netbeans app
Can you provide username and password for admin
Username: jude
Password: 123