Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

CSE-310 Programming In Java

Mini Project Pre-Submission Report

Parking Allotment System

SUBMITTED TO:

Dr. OM PRAKASH YADAV (26121)


ASST. PROFESSOR,
SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

Name (Project Head) - Kaushik Prajapati


Registration Number - 12109051
Mail Id -kp969082k@gmail.com

Name - Shubhav Kumar


Registration Number - 12108998

Name - Shubham Singh


Registration Number - 12109276

Section - K21GX
ABSTRACT

The parking allotment system mini project in Java is a software application that
allows users to book parking spots in a particular location. The project is implemented
using the Java programming language and utilizes the MySQL database for data
management.

The project has a user-friendly interface that allows users to browse available
parking spots, select a spot, and make a reservation. The system also provides real-
time parking availability updates and payment gateway integration for seamless
payment processing.

The backend of the project handles the processing of user requests, reservation
management, and generates reports on parking usage, revenue, and occupancy rates.
The system also incorporates user account management for easy management of user
information.

The parking allotment system mini project in Java can be used in various
locations such as shopping centers, airports, and stadiums, where parking is often
limited and in high demand. It provides a convenient and streamlined parking
experience for users while improving the efficiency and profitability of the parking
facility.

Overall, the parking allotment system mini project in Java is a comprehensive


and practical solution for managing parking reservations and enhancing the user
experience.
Existing System:

○ The parking allotment system mini project in Java provides a practical and
comprehensive solution for managing parking reservations and enhancing the
user experience.

○ The project's user-friendly interface, real-time parking availability updates,


and payment gateway integration make the parking experience convenient and
efficient for users.

○ The parking allotment system mini project in Java can benefit both users and
facility owners by providing a seamless and efficient parking experience while
improving the efficiency and profitability of the parking facility.

○ Overall, the parking allotment system mini project in Java is an excellent


solution for managing parking reservations and enhancing the user experience
in locations with limited parking.
Advantages of Parking Allotment System:

A parking allotment system mini project can have several advantages,


including

○ Improved Efficiency: A parking allotment system can help to streamline the


parking process, making it quicker and more efficient for users. It can reduce
the time and effort required to find a parking spot, and eliminate the need for
manual record-keeping and ticketing.

○ Reduced Traffic Congestion: With a parking allotment system, drivers can be


directed to available parking spots, reducing the number of vehicles circling
around in search of a parking spot. This can help to reduce traffic congestion,
particularly in busy areas. Drivers can easily find available parking spots, while
administrators can manage parking allotments more efficiently.

○ Increased Revenue: A parking allotment system can help to increase revenue


for parking facilities by providing real-time data on parking usage and
occupancy. This can enable administrators to adjust pricing and availability
based on demand, and optimize revenue streams.

○ Improved Safety and Security: A parking allotment system can enhance safety
and security by providing real-time data on parking usage and occupancy. This
can help to prevent overcrowding and ensure that parking facilities are being
used as intended.

Overall, a parking allotment system mini project can provide a range of benefits
to both drivers and parking administrators, making it a valuable tool for
managing parking resources.
System Requirements:

Hardware Requirements:

○ Processor: Dual-core or higher CPU.

○ Hard Disk: At least 100GB of free space or more.

○ Display: Minimum 1024 x 768 resolution.

Software Requirements:

○ Operating System: Windows, Linux, or MacOS.

○ Java Development Kit (JDK): Latest version of JDK from Oracle website.

○ Database Management System (DBMS): MySQL or PostgreSQL.

○ User Interface (UI): JavaFX or Swing.

○ Networking: Network connectivity for communication between systems.


CODE:

import java.util.Scanner;

public class ParkingAllotmentSystem {


static Scanner input = new Scanner(System.in);
static int numOfParkingLots = 0;
static int numOfFloors = 0;
static int availableParkingLots = 0;
static int[][] parkingLots;
static int floorNumber = 1;
static int parkingLotNumber = 1;
static int costPerHour = 10;
static int totalEarnings = 0;

public static void main(String[] args) {


initializeParkingLots();
int choice = 0;
do {
System.out.println("Parking Allotment System");
System.out.println("1. Check availability");
System.out.println("2. Book a parking lot");
System.out.println("3. View status");
System.out.println("4. Check out");
System.out.println("5. Exit");
System.out.print("Enter your choice: ");
choice = input.nextInt();

switch (choice) {
case 1:
checkAvailability();
break;
case 2:
bookParkingLot();
break;
case 3:
viewStatus();
break;
case 4:
checkOut();
break;
case 5:
System.out.println("Thank you for using
Parking Allotment System!");
break;
default:
System.out.println("Invalid choice.
Please try again.");
break;
}

} while (choice != 5);

input.close();
}

public static void initializeParkingLots() {


System.out.print("Enter the number of floors: ");
numOfFloors = input.nextInt();
System.out.print("Enter the number of parking lots
per floor: ");
numOfParkingLots = input.nextInt();
availableParkingLots = numOfFloors *
numOfParkingLots;
parkingLots = new
int[numOfFloors][numOfParkingLots];
System.out.println("Parking lot initialized with "
+ numOfFloors + " floors and " + numOfParkingLots + "
parking lots per floor.");
}

public static void checkAvailability() {


if (availableParkingLots == 0) {
System.out.println("Sorry, no parking lots
available at the moment.");
} else {
System.out.println("There are " +
availableParkingLots + " parking lots available.");
}
}

public static void bookParkingLot() {


if (availableParkingLots == 0) {
System.out.println("Sorry, no parking lots
available at the moment.");
return;
}
System.out.println("Floor number starts from 1 and
parking lot number starts from 1.");
System.out.print("Enter the floor number: ");
floorNumber = input.nextInt() - 1;
System.out.print("Enter the parking lot number: ");
parkingLotNumber = input.nextInt() - 1;
if (parkingLots[floorNumber][parkingLotNumber] !=
0) {
System.out.println("Sorry, the parking lot is
already occupied.");
return;
}

parkingLots[floorNumber][parkingLotNumber] = 1;
availableParkingLots--;
System.out.println("Your parking lot number is " +
(floorNumber + 1) + "-" + (parkingLotNumber + 1) + ".");
}

public static void viewStatus() {


System.out.println("Total parking lots: " +
(numOfFloors * numOfParkingLots));
System.out.println("Available parking lots: " +
availableParkingLots);
System.out.println("Occupied parking lots:");
for (int i = 0; i < numOfFloors; i++) {
System.out.print("Floor " + (i + 1) + ": ");
for (int j = 0; j < numOfParkingLots; j++) {
if (parkingLots[i][j] == 1) {
System.out.print((j + 1) + " ");
}
}
System.out.println();
}
}

public static void checkOut() {


System.out.print("Enter the floor number: ");
floorNumber = input.nextInt() - 1;
System.out.print("Enter the parking lot number: ");
parkingLotNumber = input.nextInt() - 1;
if (parkingLots[floorNumber][parkingLotNumber] ==
0) {
System.out.println("Sorry, the parking lot is
not occupied.");
return;
}

System.out.print("Enter the number of hours parked:


");
int numOfHours = input.nextInt();
int cost = numOfHours * costPerHour;
System.out.println("The parking fee is: $" + cost);
totalEarnings += cost;
parkingLots[floorNumber][parkingLotNumber] = 0;
availableParkingLots++;
}
}
CONCLUSION:

In conclusion, the development of a parking allotment system as a mini


project can provide valuable experience in designing and implementing a real-
world system. Through the project, students can gain practical skills in
programming, software development, and system integration.

○ A successful parking allotment system mini project should include the


following components: a user interface for administrators to manage parking
spaces and users to book parking spots; a database to store parking space
information, user profiles, and booking records; and a backend system to
process user requests, monitor parking occupancy, and generate reports.

○ Through the mini project, students can also gain an understanding of the
challenges involved in developing a complex system, such as data security and
privacy concerns, system scalability, and user experience.

○ Overall, the parking allotment system mini project can provide a valuable
learning experience for students and prepare them for future careers in software
development and system design.
REFERENCE:

○ Core Java Volume I-Fundamentals

○ Core Java An Integrated Approach (also known as Java Black Book)

○ Effective Java

You might also like