0% found this document useful (0 votes)
323 views12 pages

WBJP Micro

This document describes a micro project for a car rental system created by students at Government Polytechnic, Ahmedabad as part of their Web based Java Programming course. The project displays information on popular car rental options in Ahmedabad, including images and details of cars like the Tata Punch, Hyundai Aura, Maruti Ertiga, and Hyundai i20. It shows details like user reviews, specifications, rental prices and availability for each car. An index page displays this information for multiple cars and links to individual car pages. The document also includes a certificate and rubric for evaluating the students' work.

Uploaded by

The Dhvanit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
323 views12 pages

WBJP Micro

This document describes a micro project for a car rental system created by students at Government Polytechnic, Ahmedabad as part of their Web based Java Programming course. The project displays information on popular car rental options in Ahmedabad, including images and details of cars like the Tata Punch, Hyundai Aura, Maruti Ertiga, and Hyundai i20. It shows details like user reviews, specifications, rental prices and availability for each car. An index page displays this information for multiple cars and links to individual car pages. The document also includes a certificate and rubric for evaluating the students' work.

Uploaded by

The Dhvanit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

GOVERNMENT POLYTECHNIC, AHMEDABAD


COMPUTER ENGINEERING DEPARTMENT

Affiliated
To
Gujarat Technological University, Ahmedabad

Micro project Report


D. E. Third Year (Semester–V)

Web based Java Programming


(4350708)
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

Government Polytechnic, Ahmedabad


Computer Engineering Department

CERTIFICATE

This is to certify that

Sr. No. Enrollment No. Name

1 216170307159 Prajapati Pratik K.

2 216170307170 Jadav Umesh Ramjibhai

Of Fifth semester of Diploma in Computer Engineering of Government Polytechnic,


Ahmedabad has completed the Micro-Project satisfactorily in Subject Web based
Java Programming (4350708) for the academic year 2023-2024 as prescribed in the
curriculum.

Lecturer, HOD
Computer Engg. Dept., Computer Engg. Dept.,
Government Polytechnic, Ahmedabad Government Polytechnic,
Ahmedabad
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

RUBRICS FOR MICRO-PROJECT ASSESMENT

Allocated
Parameters High Medium Low
Marks

Problem is
Problem is
Properly Problemis
Properly
Problem Analysis Analysed but Properly
8 Analysed and
and Solution(R1) Partially Analysed but not
Solved
Solved Solved.

8Marks 5Marks 2Marks

Student Did Not


Student
Student Answered
Answer Any
Answered All
Only A Few Viva
VivaVoce(R2) 2 VivaVoce
The Viva
VoceQuestions
VoceQuestions Questions

2Marks 1Marks 0Marks


Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

INDEX

1. Introduction of project statement

2. Functionality of project

3. Coding / implementation

4. Output (screenshots)

Enrollment Student Name Marks(R1) Marks(R2) Total


Number Marks
216170307159 Prajapati Pratik K.

216170307170 Jadav Umesh Ramjibhai

Name and Sign of Faculty:


Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

Car Rental System

Index.jsp :-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>index</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="main">
<nav>
<header>
<li>HOME</li>
<li>ABOUT</li>
<li>CONTACT US</li>
<li>SERVICES</li>
<li id="Login">Login/Signup</li>

</header>
</nav>
<div class="Ahemdabad"><h3>Populer Cars in Ahemdabad</h3></div>
<div class="Car-1">
<div class="Car-image-1">
<a href="first.jsp"><img src="https://zoomcar-
assets.zoomcar.com/282190/HostCarImage/host_car_image_2821907c845494-e4b2-4cb0-bae0-
173a8e14f23a.jpg20230703-34-1sc3clk" alt="" height="100%" width="100%"></a>
</div>
<div class="Car-description-1">
<div class="Car-review-icon-1">
<img src="https://www.zoomcar.com/img/icons_star.svg" alt="">
</div>
<div class="Car-review-value-1">4.9</div>
<div class="Car-title-1"><p>Tata Punch 2022</p></div>
<div class="Car-properties">
<div class="Car-properties1"><p>Manual</p></div>
<div class="Car-properties1"><p>Petrol</p></div>
<div class="Car-properties1"><p>5-setes</p></div>
</div>
<hr>

<div class="Car-price-distance">
<div class="Car-price">
<div class="Car-price-avalibilty">Avalable from 7 November</div>
<div class="Car-price-title">Rs.126/hr</div>
</div>
</div>
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

<div class="Car-distance">
<div class="place-image"> <img
src="https://www.zoomcar.com/img/icons_location.svg" alt=""></div>
<div class="Car-distance-place">Ahemdabad</div>
</div>
</div>
</div>
<div class="Car-2">
<div class="Car-image-1">
<img src="https://zoomcar-
assets.zoomcar.com/116027/HostCarImage/host_car_image_116027caa5c47f-202c-47b1-9ffe-
c50219e44a86.jpg20230222-66-l3bhce" alt="" height="100%" width="100%">
</div>
<div class="Car-description-1">
<div class="Car-review-icon-1">
<img src="https://www.zoomcar.com/img/icons_star.svg" alt="">
</div>
<div class="Car-review-value-1">4.7</div>
<div class="Car-title-1"><p>Hyundai Aura 2020</p></div>
<div class="Car-properties">
<div class="Car-properties1"><p>Manual</p></div>
<div class="Car-properties1"><p>Petrol</p></div>
<div class="Car-properties1"><p>5-setes</p></div>
</div>
<hr>

<div class="Car-price-distance">
<div class="Car-price">
<div class="Car-price-avalibilty">Avalable from 5 November</div>
<div class="Car-price-title">Rs.130/hr</div>
</div>
</div>

<div class="Car-distance">
<div class="place-image"> <img
src="https://www.zoomcar.com/img/icons_location.svg" alt=""></div>
<div class="Car-distance-place">Ahemdabad</div>
</div>
</div>
</div>
<div class="Car-3">
<div class="Car-image-1">
<img src="https://zoomcar-
assets.zoomcar.com/247218/HostCarImage/host_car_image_2472187ddbd448-34d7-47c8-831e-
a764b3217833.jpg20230427-40-1ag86m9" alt="" height="100%" width="100%">
</div>
<div class="Car-description-1">
<div class="Car-review-icon-1">
<img src="https://www.zoomcar.com/img/icons_star.svg" alt="">
</div>
<div class="Car-review-value-1">4.9</div>
<div class="Car-title-1"><p>Maruti Ertiga 2020</p></div>
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

<div class="Car-properties">
<div class="Car-properties1"><p>Manual</p></div>
<div class="Car-properties1"><p>Petrol</p></div>
<div class="Car-properties1"><p>7-setes</p></div>
</div>
<hr>

<div class="Car-price-distance">
<div class="Car-price">
<div class="Car-price-avalibilty">Avalable from 5 November</div>
<div class="Car-price-title">Rs.204/hr</div>
</div>
</div>

<div class="Car-distance">
<div class="place-image"> <img
src="https://www.zoomcar.com/img/icons_location.svg" alt=""></div>
<div class="Car-distance-place">Ahemdabad</div>
</div>
</div>
</div>
<div class="Car-4">
<div class="Car-image-1">
<img src="https://zoomcar-
assets.zoomcar.com/85825/HostCarImage/85825_host_car_image_85825169cea44-48ae-4d20-868c-
48a61215b6489b0ab167-12ea-474d-b5ec-af57669b284e.jpg" alt="" height="120px" width="100%">
</div>
<div class="Car-description-1">
<div class="Car-review-icon-1">
<img src="https://www.zoomcar.com/img/icons_star.svg" alt="">
</div>
<div class="Car-review-value-1">4.9</div>
<div class="Car-title-1"><p>Hyundai I20 2021</p></div>
<div class="Car-properties">
<div class="Car-properties1"><p>Manual</p></div>
<div class="Car-properties1"><p>Petrol</p></div>
<div class="Car-properties1"><p>5-setes</p></div>
</div>
<hr>

<div class="Car-price-distance">
<div class="Car-price">
<div class="Car-price-avalibilty">Avalable from 7 November</div>
<div class="Car-price-title">Rs.187/hr</div>
</div>
</div>

<div class="Car-distance">
<div class="place-image"> <img
src="https://www.zoomcar.com/img/icons_location.svg" alt=""></div>
<div class="Car-distance-place">Ahemdabad</div>
</div>
</div>
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

</div>

</div>
<a href="first.jsp">First Jsp</a>
</body>
</html>

First.jsp :-
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<title>Rent a Car</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="rent-car">
<h1>Rent Car</h1>
<form action="payment.jsp" method="post">
Name:
<input type="text" name="name" value="1" id="name"><br><br>
Mobile Number:
<input type="number" name="number" id="number"><br><br>
<label for="cars">Choose a car:</label>
<select name="cars" id="cars">
<option value="Tata Punch">Tata Punch</option>
<option value="Hyundai Aura">Hyundai Aura</option>
<option value="Maruti Ertiga">Maruti Ertiga</option>
<option value="Hyundai I20">Hyundai I20</option>
</select> <br><br>
Start Date: <input type="date" name="start_date"><br><br>
End Date: <input type="date" name="end_date"><br><br>
Payment Method:Online
<input type="checkbox" name="Online" id="Online" value="Online"><br><br>
<input type="submit" value="Rent">
</form>

</div>
<%
String url = "jdbc:mysql://localhost:3306/car rent";
String username = "root";
String password = "";

String name = request.getParameter("name");


String number= request.getParameter("number");
String choose_car= request.getParameter("cars");
String start_date= request.getParameter("start_date");
String end_date= request.getParameter("end_date");
String payment= request.getParameter("Online");
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

try {
Class.forName("com.mysql.cj.jdbc.Driver");
Connection connection = DriverManager.getConnection(url, username, password);

String sql = "INSERT INTO car(name, number,start_date,end_date,payment) VALUES


(?,?,?,?,?,?)";
PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1, name);
statement.setString(2, number);
statement.setString(3, cars);
statement.setString(4, start_date);
statement.setString(5, end_date);
statement.setString(6, payment);

int rowsInserted = statement.executeUpdate();


if (rowsInserted > 0) {
out.println("Record inserted successfully!");
} else {
out.println("Failed to insert the record.");
}

statement.close();
connection.close();
} catch (Exception e) {
out.println("An error occurred: " + e.getMessage());
}
%>

</body>
</html>

payment.jsp :-
<!DOCTYPE html>
<html>
<head>
<title>Payment Form</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="payment">
<h1>Payment Details</h1>
<form action="book_car.jsp" method="post">
<label for="card_number">Card Number:</label>
<input type="text" id="card_number" name="card_number" placeholder="Enter your card
number" required><br><br>

<label for="expiration_date">Expiration Date:</label>


Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

<input type="text" id="expiration_date" name="expiration_date" placeholder="MM/YY"


required><br><br>

<label for="cvv">CVV:</label>
<input type="text" id="cvv" name="cvv" placeholder="CVV" required><br><br>

<label for="amount">Amount:</label>
<input type="text" id="amount" name="amount" placeholder="Enter the amount"
required><br><br>

<input type="submit" value="Make Payment">


</form>
</div>
</body>
</html>

book_car.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title>Car Rental System</title>
</head>
<body>
<h1>Book Car successfully</h1>

</body>
</html>

Output :-
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad
Web based Java Programming (4350708) Government Polytechnic, Ahmedabad

You might also like