C++ Report

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

CAR RENTAL SYSTEM

Group 14

Guided By: Submitted By:


Dr. Prasant Kumar Dash Regd. No.-2201020411 Name1-Sanjeeb ku. Pothal
Asst. Prof., Dept. of CSE Regd. No.-2201020401 Name2-Mausumi Panda
Dept. of CSE, CGU, Odisha Regd. No.-2201020403 Name3-Nibedita Nayak

Department of Computer Science & Engineering


C.V. Raman Global University, Bhubaneswar, Odisha
752054
DECLARATION
We hereby declare that the research report entitled "Car Rental System" is
submitted to the Department of Computer Science and Engineering at C.V.
Raman Global University, Bhubaneshwar, Odisha, under the guidance of Dr.
Prasant Kumar Dash, Associated Professor, Department of Computer Science
Engineering, CGU, Odisha. We further declare that this work has not been
submitted elsewhere for the award of any other degree or qualification.
ACKNOWLEDGEMENT
We would like to express our heartfelt gratitude to DR. Prasant Kumar Dash,
who has been the guiding light throughout our journey in this project. Her
unwavering support, valuable insights, and inspiration have been instrumental
in the successful completion of this case study. We are also deeply indebted to
the dedicated faculty members of the Department of Computer Science and
Engineering at C.V. RAMAN GLOBAL UNIVERSITY (CGU),
Bhubaneshwar, Odisha. Their constant encouragement and academic guidance
provided us with the necessary direction and motivation to overcome challenges
and achieve our project goals. Furthermore, we extend our thanks to the entire
academic and staff community of the Department at C.V. RAMAN GLOBAL
UNIVERSITY. Their collective effort, commitment, and invaluable assistance,
especially during critical phases of our work, have made a significant
difference. Without their support, this project would have been an even more
formidable task. We are grateful for the nurturing environment provided by
C.V. RAMAN GLOBAL UNIVERSITY, which has fostered our learning and
research endeavors. This project would not have been possible without the
resources and facilities made available to us. Thank you to everyone who
contributed to the realization of this case study.
TABLE OF CONTENTS

I. Problem Statement 1

II. Introduction 2

a. Background 2

b. Challenges 3

III. Proposed Solution 4

a. Description 4

b. Flow Chart 5

c. Algorithm 6

d. Source Code 7

IV. Result & Analysis 10

a. Explanation of Source Code 10

V. Conclusion 15
PROBLEM STATEMENT

The C++ code is designed to create a simple car rental booking system with
MySQL database integration. The program connects to a MySQL database and
interacts with a table named 'customer' that includes columns for customer
information such as name, phone, email, rent amount, and car type. The
objective of the Car Rental System is to create a user-friendly application that
allows customers to rent cars easily and efficiently. The system should provide
functionalities for managing car inventory, processing rental requests, and
maintaining customer records. Users should be able to reserve a car for a
specific period.The system should generate a confirmation with the rental
details and total cost. Confirmation should include a unique reservation ID.
INTRODUCTION

The Car Rental System is a comprehensive software application designed to


streamline the process of renting vehicles for customers. In this system, we
leverage the power of C++ for building the application logic and MySQL for
efficient data management. This integration ensures a robust and scalable
solution to manage the complexities of a car rental business. The application
efficiently manages a database of cars, including essential details like model,
make, year, rental cost, and availability status. The application efficiently
manages a database of cars, including essential details like model, make, year,
rental cost, and availability status.

A.BACKGROUND

Car rental businesses face the challenge of efficiently managing a


fleet of vehicles, handling reservations, and providing a seamless
experience for customers. The Car Rental System aims to address
these challenges by automating key processes, enhancing user
experience, and maintaining a centralized database for effective
data management. The background of this system includes:

o Object-Oriented Programming (OOP)


o Standard Template Library (STL)
o Memory Management
o Efficiency
B.CHALLENGES

Developing a car rental system using C++ and MySQL comes with its own set
of challenges:

 Concurrency and Transactions: Managing concurrent access to the


database can lead to issues like data inconsistency or conflicts.
 Security Concerns: Ensuring the security of sensitive customer
information, such as personal details and payment information.
 Data Validation and Integrity: Ensuring that data entered by users is
valid and maintaining data integrity in the database.
 Error Handling and Logging: Effectively handling errors that may
occur during database operations or application logic.
 User Authentication and Authorization: Ensuring that only authorized
users can access certain functionalities and data.
 Handling Rental Conflicts: Managing situations where multiple users
attempt to reserve the same car simultaneously.
 User Experience: Creating a user-friendly interface for both customers
and administrators.
 Backup and Recovery: Developing a robust backup and recovery
strategy to prevent data loss in case of system failures.
PROPOSED SOLUTION

Develop a user-friendly, feature-rich car rental system (CRS) with seamless


database integration. It has car management, reservation system, and secure data
access mechanisms. By combining C++ for the application logic and MySQL
for data storage, you can create a reliable and efficient car rental system that
addresses the specified problem statement.

A.DESCRIPTION

 MySQL Database Connection: The code establishes a connection to a


MySQL database using the MySQL C API.Connection details such as host,
user, password, and database are provided as constants.
 Car Class: Defines a Car class with private attributes such as Brand,
Model, Serial, Rent, and Availability.Constructor initializes the car object
with these attributes.
 isAvail Function: Checks the availability of a car based on its serial
number by executing a SELECT query on the database.
 Main Function: Creates instances of the Car class representing different
cars.Inserts car data into the MySQL database using SQL INSERT queries.
 Menu and User Interaction: Displays a menu for the user to either select
a car or exit the system.Retrieves and displays information about available
cars from the database.
 Car Selection: Asks the user to input a serial number to select a
car.Checks the availability of the selected car and updates its availability in
the database using SQL UPDATE queries.Displays information about the
selected car.
 Exit: Allows the user to exit the system.
B.FLOW CHART

You might also like