Coders Packet

Car Rental Application in Java

By Abhijit Shivaji Nawale

This is a car rental system user can rent a car for a period of time and then return it with specific rent.

* Overview

This system is based on a concept to rent cars and generate rental money. Before stepping into the main system a user has to pass through a login system to get access, then only the user can select cars with a different model and rent for certain days. This project contains limited features, but the essential one.

* Requirments

    1) Install JDK

    2) Install Netbeans editor

    3) Install MySQL database

    4)MySQL Connector

 *How to build this project

  a) Make a folder carrent and that folder make five files.

     1)CarLogin -> login page

     2)CarRent  -> Select car and Rent

     3) MainFrame -> Buttons where to go return of rent

     4)Rentail and Return -> for rentail and return the car. 

b) How to establish connection JDBC to MySQL database.

     1) Add MySQL connector jar file to libraries folder in project.

     2) make connection 

         program to load com.mysql.cj.jdbc.Driver class using the Class.forName() method


        Connecting to your DBMS with the DriverManager the class involves calling the method DriverManager.getConnection.and URL is   

        connecting to the MySQL with server name localhost, port 3006 and root and 123456 is MYSQL database username and password.

         Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/user","root","123456");          st=(Statement)conn.createStatement();  

     3) use Netbeans Ant for libraries to add.


  c) All other information in a zip file extract the zip and run in your NetBeans editor.      

 ** Images **



Download Complete Code


No comments yet