72a7 Ds Project

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

A

Report on

PARKING LOT MANAGEMENT


Submitted for partial fulfilment of the requirements for the Award of the degree of
BACHELOR OF TECHNOLOGY IN
ARTIFICIAL INTELLIGENCE AND DATA SCIENCE
By
N.RAVINDER -23K81A72A7
Under the Guidance of

MR.KRISHNA REDDY

Assistant professor

ARTIFICIAL INTELLIGENCE AND DATA SCIENCE

St. MARTIN’S ENGINEERING COLLEGE


UGC AUTONOMOUS
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad – 500100

i
St. MARTIN’S ENGINEERING COLLEGE
UGC AUTONOMOUS
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad – 500100

CERTIFICATE

This is to certify that the project entitled “PARKING LOT MANAGEMENT


SYSTEM” is being submitted by N.RAVINDER (23K81A72A7) in
fulfilment of the requirement for the award of degree of
BACHELOR OF TECHNOLOGY IN ARTIFICIAL INTELLIGENCE
AND MACHINE LEARNING is recorded of bonafide work carried out by
them. The result embodied in this report have been verified and found
satisfactory.

Project internal examiner Signature of HOD


Mr. KRISHNA REDDY MR.RAJALINGAM
Assistant professor Professor and head of the department
Department of AI&ML Department of AI&DS

ii
9

CONTENTS

CHAPTER 1-ABSTRACT 1
CHAPTER 2- INTRODUCTION 2
CHAPTER 3-SYSTEM ANALYSIS 3
3.1 EXISTING SYSTEM 3
3.2 PROPOSED SYSTEM 3
CHAPTER 4- SYSTEM REQUIREMENT 4
CHAPTER 5- SYSTEM ARCHITECTURE
5.1 ALGORITHM 5
CHAPTER 6- SYSTEM IMPLEMENTATION 7
CHAPTER 7- SYSTEM TESTING 13
CHAPTER 8- OUTPUT SCREENS 15
CHAPTER 9- CONCLUSION 17
CHAPTER 10- FUTURE ENHANCEMENT 18
CHAPTER 11- REFERENCES 19

iii
1. ABSTRACT

This project describes the design, implementation, and testing of a C program for parking lot
management system that uses queues concept in data structures to manage orders. The program has
four functions : park a car, remove a car, display parked cars and calculate the parking fee. The
customer can check whether he/she can park a car and can also calculate the parking fee. The bill
can be generated by the user based on the hourly prices. The program uses dynamic memory
allocation, structures, queues, pointers, and files to store and manipulate the data. The
documentation project explains the problem statement, objectives, scope, methodology, data
structures, source code, test cases, and results of the program. This project also provides screenshots
of the program output and user interface. This project aims to demonstrate the application of queues
concept in data structures to solve a real-world problem using C programming language.

1
2. INTRODUCTION

A parking lot management system is a software solution that helps efficiently manage parking
spaces. It can include features like automated ticketing, real-time availability tracking, and payment
processing. It's a great way to streamline parking operations and enhance the overall parking
experience.

It can also include features like license plate recognition, parking guidance systems, and integration
with mobile apps for convenient parking reservations. With a parking lot management system, you
can optimize space utilization, reduce congestion, and provide a seamless parking experience for
both drivers and parking lot operators. It's a smart solution to make parking hassle-free and efficient.

Parking lot management system is like a super helpful tool for managing parking spaces. It's all
about making parking easier and more organized. With this system, you can keep track of available
parking spots, issue tickets automatically, and even process payments smoothly. It's a great way to
streamline the entire parking process and make life a lot easier for both drivers and parking lot
operators.

2
GG
3. SYSTEM ANALYSIS

3.1 EXISTING SYSTEM AND DISADVANTAGES:

1. Lack of real-time information: Some systems may not provide up-to-date information on
parking availability, resulting in frustration for users who arrive at a full parking lot.

2. Inefficient payment processes: Traditional systems often rely on manual payment collection,
which can lead to long queues and delays for users trying to exit the parking lot.

3. Limited scalability: Older systems may struggle to handle a large number of parking spaces or
multiple parking lots, making it difficult to expand or adapt to growing needs.

4. Poor user experience: Complex interfaces or confusing signage can make it difficult for users to
navigate the parking lot, leading to frustration and wasted time.

It's important to note that advancements in technology have led to the development of more efficient
and user-friendly parking lot management systems. These newer systems often address the
disadvantages of older systems by incorporating real-time data, seamless payment options

3.2 PROPOSED SYSTEM AND ADVANTAGES:

The proposed system aims to address the limitations of existing systems and provide a more
seamless parking experience. Here are some advantages it offers:
1. Real-time parking availability: The system can provide real-time information on available
parking spaces, allowing users to quickly find an open spot without wasting time.
2. Efficient payment processes: The proposed system can incorporate automated payment methods,
such as mobile payments or online booking, making the payment process faster and more convenient
for users.
3. Scalability and flexibility: The system can be designed to handle a large number of parking
spaces and multiple parking lots, making it easier to scale and adapt to changing needs.

3
4. SYSTEM REQUIREMENT

5.1 SOFTWARE REQUIREMENTS:

Operating system: windows

5.2 HARDWARE REQUIREMENTS:

Processor:Intel i3

Hard disk:500 gb

Ram:4gb

4
5. SYSTEM ARCHITECTURE

5.1 FLOW CHART AND IT’S DESCRIPTION:

5.2 ALGORITHM:
STEP 1- Park a Car:

User provides car details (plate number, entry time, exit time).

The system enqueues the car in the queue.


STEP 2- Remove a Car by Plate Number:

User provides a plate number.

The system searches for the car by plate number and dequeues it from the queue.

STEP 3- Display Parked Cars:

The system displays details of all parked cars along with entry, exit times,

and parking fees.

STEP 4- Calculate Parking Fee:

The system calculates the parking fee based on the entry and exit times.

6
6. SYSTEM IMPLEMENTATION

6.1 SOURCE CODE:

#include <stdio.h>

#include <stdlib.h>

#include <string.h>
#define MAX_SIZE 100
typedef struct {
char plateNumber[10];
int entryHour;
int entryMinute;
int exitHour;
int exitMinute;
} Car;
typedef struct {
Car cars[MAX_SIZE];
int front;
int rear;
} Queue;
void initializeQueue(Queue *q) {
q->front = -1;
q->rear = -1;
}
int isQueueEmpty(Queue *q) {
return (q->front == -1 && q->rear == -1);
}
int isQueueFull(Queue *q) {
return (q->rear == MAX_SIZE

}
void enqueue(Queue *q, Car car) {
if (isQueueFull(q)) {
printf("Queue is full. Cannot add more
cars.\n"); return;
}

7
if (isQueueEmpty(q)) {
q->front = 0;
}
q->rear++;
q->cars[q->rear] = car;
}
Car dequeue(Queue *q) {
if (isQueueEmpty(q)) {
printf("Queue is empty. No cars to remove.\n");
Car emptyCar = {"", 0, 0, 0, 0}; return
emptyCar;
}
Car car = q->cars[q->front];
if (q->front == q->rear) {
q->front = -1;
q->rear = -1;
} else {
q->front++;
}
return car;
}
Car removeCarByPlateNumber(Queue *q, const char *plateNumber)
{ int foundIndex = -1;
for (int i = q->front; i <= q->rear; i++) {
if (strcmp(q->cars[i].plateNumber, plateNumber) == 0)

foundIndex = i;
break;
}
}
if (foundIndex != -1) {
Car removedCar = q->cars[foundIndex];
for (int i = foundIndex; i < q->rear; i++) {
q->cars[i] = q->cars[i + 1];

8
}
q->rear--;
return removedCar;
}
Car notFoundCar = {"", 0, 0, 0, 0};
return notFoundCar;
}
float calculateParkingFee(Car car) {
int entryTime = car.entryHour * 60 + car.entryMinute; int
exitTime = car.exitHour * 60 + car.exitMinute; int
duration = exitTime - entryTime; float fee = duration
* 0.5;
return fee;
}
int main() {
Queue parkingLot;
initializeQueue(&parkingLot);
int choice;
do {
printf("\n--- Parking Lot Management System ---
\n"); printf("1. Park a car\n");

printf("2. Remove a car by plate number\n");


printf("3. Display all cars\n");
printf("4. Exit\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice) {
case 1: {
Car car;
printf("Enter the plate number of the car: ");
scanf("%s", car.plateNumber);
printf("Enter the entry time (hours minutes): ");
scanf("%d %d", &car.entryHour, &car.entryMinute);

9
printf("Enter the exit time (hours minutes): ");
scanf("%d %d", &car.exitHour, &car.exitMinute);
enqueue(&parkingLot, car);
printf("Car parked successfully.\n");
break;
}
case 2: {
char plateNumber[10];
printf("Enter the plate number of the car to remove: ");
scanf("%s", plateNumber);
Car removedCar = removeCarByPlateNumber(&parkingLot, plateNumber); if
(strcmp(removedCar.plateNumber, "") != 0) {
printf("Car with plate number %s removed from the parking lot.\n",
removedCar.plateNumber);
float fee = calculateParkingFee(removedCar);
printf("Parking fee: Rs%.2f\n", fee);
} else {
printf("Car with plate number %s not found in the parking lot.\n",
plateNumber);

}
break;
}
case 3: {
if (isQueueEmpty(&parkingLot)) {
printf("No cars parked in the parking lot.\n");
} else {
printf("Cars parked in the parking lot:\n");
for (int i = parkingLot.front; i <= parkingLot.rear; i++) { printf("Plate
Number: %s\n", parkingLot.cars[i].plateNumber); printf("Entry
Time: %02d:%02d\n", parkingLot.cars[i].entryHour,
parkingLot.cars[i].entryMinute);

10
printf("Exit Time: %02d:%02d\n", parkingLot.cars[i].exitHour,
parkingLot.cars[i].exitMinute);
float fee = calculateParkingFee(parkingLot.cars[i]);
printf("------------------------\n");
}
}
break;
}
case 4: {
printf("Exiting the program. Goodbye!\n");
exit(0);
}
default:
printf("Invalid choice. Please try again.\n");
}
}

while(1);

return 0;}

}
}
printf("Cart is full. Remove some items before adding more.\n");
}
void removeFromCart(struct ShoppingCart* cart, const char* name, int quantity) {
for (int i = 0; i < 10; ++i) {
if (strcmp(cart->items[i].name, name) == 0) {
if (quantity >= cart->items[i].quantity) {
cart->total -= cart->items[i].price * cart->items[i].quantity;
cart->items[i].quantity = 0;
} else {
cart->total -= cart->items[i].price * quantity;
cart->items[i].quantity -= quantity;
}
return;
}
}
printf("Item not found in the cart.\n");
}
int main() {
struct ShoppingCart cart;
memset(&cart, 0, sizeof(struct ShoppingCart));

11
int choice;
char itemName[50];
int itemPrice, itemQuantity;

do {
printf("\n\n1. Add item to cart\n");
printf("2. Remove item from cart\n");
printf("3. Display cart\n");
printf("4. Exit\n");
printf("Enter your choice: ");
scanf("%d", &choice);

switch (choice) {
case 1:
printf("Enter item name: ");
scanf("%s", itemName);
printf("Enter item price: ");
scanf("%d", &itemPrice);
printf("Enter item quantity: ");

scanf("%d", &itemQuantity);
addToCart(&cart, itemName, itemPrice, itemQuantity);
break;
case 2:
printf("Enter item name to remove: ");
scanf("%s", itemName);
printf("Enter quantity to remove: ");

scanf("%d", &itemQuantity);

removeFromCart(&cart, itemName, itemQuantity);


break;
case 3:
displayCart(&cart);
break;
case 4:
printf("Exiting...\n");
break;
default:
printf("Invalid choice. Please try again.\n");
}
} while (choice != 4);
return 0;
}

12
7. SYSTEM TESTING
7.1 Test Case 1:
Select your choice
Inputs:
Choose option 1 to park a car.
Enter plate number of car: "aw23f"
Enter the entry time (hours minutes): 11 40
Enter the exit time (hours minutes): 12 40
Expected Output:
Car parked successfully.
7.1.1. Select your choice
Inputs:
Choose option 1 to park a car.
Enter plate number of car: "wp26t"
Enter the entry time (hours minutes): 5 00
Enter the exit time (hours minutes): 7 00
Expected Output:
Car parked successfully.
7.1.2. Select your choice
Inputs:
Choose option 1 to park a car.
Enter plate number of car: "ce45k"
Enter the entry time (hours minutes): 10 00
Enter the exit time (hours minutes): 12 00
Expected Output:
Car parked successfully.

7.2Test Case 2:
Select your choice
Inputs:
Choose option 2 to remove a car by plate number.

13
Enter the plate number of a car to remove: "wp26t"
Expected Output:
Car with plate number wp26t removed from the parking lot.
Parking fee: Rs60.00
7.3 Test case 3:
Select your choice:
Inputs:
Choose option 3 to Display all cars.
Expected Output:
Cars parked in the parking lot:
Plate number: aw23f, wp26t, ce45k
Entry time:11:40, 05:00, 10:30.
Exit time: 12:40, 07:00, 12:30.
Parking fee: 30/-, 60/-, 60/-.

7.4 Test case 4:


Select your choice:
Inputs:
Choose option 4 to Exit
Expected Output:

Exiting the program!!

14
8.OUTPUT SCREENS

8..1 Test 1:

8.2 Test 2:

15
8.3 Test 3:

8.4 Test 4:

16
9. CONCLUSION

In conclusion, a well-designed parking lot management system can greatly improve the parking
experience for both operators and users. By incorporating real-time information, efficient
payment processes, scalability, enhanced user experience, and improved security measures, the
system can streamline operations and make parking more convenient and hassle-free. It's an
exciting area of development that aims to optimize parking resources and enhance overall
satisfaction.

Parking lot management system improve efficiency and convenience, but it also has the potential
to reduce traffic congestion, minimize environmental impact, and even generate revenue for
parking lot operators. It's a win-win situation for everyone involved!

It's also worth mentioning that a well-implemented parking lot management system can help
optimize space utilization, reduce the time spent searching for parking, and enhance overall
traffic flow in the surrounding area. It's an exciting field with ongoing advancements that aim to
make parking more efficient and stress-free.

17
10. FUTURE ENHANCEMENTS

Future enhancements of parking lot management systems, there are several exciting possibilities.
Some potential enhancements include:

1. Integration of smart parking technologies: This could involve using sensors or cameras to
detect available parking spaces in real-time and guiding drivers to those spots through mobile
apps or digital signage.

2. Predictive analytics: By analysing historical data and real-time information, parking lot
management systems could predict parking demand, helping users plan their parking in advance
and reducing congestion.

3. Integration with navigation systems: Parking lot management systems could be integrated with
navigation apps, providing users with real-time parking availability and guiding them to the
nearest parking facility.

4. Electric vehicle (EV) charging infrastructure: With the rise of electric vehicles, parking lot
management systems could incorporate EV charging stations, allowing users to conveniently
charge their vehicles while parked.

5. Enhanced security features: Future systems could incorporate advanced security measures
such as facial recognition, license plate recognition, and automated access control systems to
ensure a safe parking environment.

18
11. REFERENCES

1. https://www.programiz.com/c-programming
2. https://www.geeksforgeeks.org/queue-data-structure/
3. https://www.academia.edu/36410792/Parking_Management_System_Parking_Management_Sy
stem
4. https://en.wikipedia.org/wiki/Data_structure
5. https://en.wikipedia.org/wiki/Linked_list

19

You might also like