COMPUTER SCIENCE PROJECT
CAR RENTAL BOOKING SYSTEM
Academic Session 2024-25
SUBMITTED BY
K. VAIBHAV
SUBMITTEDTO
Mr. VIJAYANAND
SRI CHAITANYA TECHNO SCHOOL
SALEM – 636004
TAMILNADU
CERTIFICATE
This is to certify that K.Vaibhav, Reg. No: a student of class12
(science) has successfully completed his project work under guidance of subject
teacher Mr. VIJAYANAND during the year 2024-25 from SRI CHAITANYA TECHNO
SCHOOL in partial fulfillment of COMPUTER SCIENCE practical examination
conducted by CBSE.
__________________ ____________________
INTERNAL EXAMINER EXTERNAL EXAMINER
ACKNOWLEDGEMENT
The success and final outcome of this project required a lot of guidance and
assistance from many people and I am extremely fortunate to have got this all
along with the completion of my project work. Whatever I have done is only due
to such guidance and assistance and I would not forget to thank them.
I respect and thank Computer teacher Mr. VIJAYANAND for giving me an
opportunity to do this project work and providing me with all support and
guidance which made me complete the project on time.
Last but not least I would like to thank all my friends who supported me all the
way and my parent who helped me financially and encouraged me throughout
the completion of the project.
K. VAIBHAV
Car Rental Booking System
INTRODUCTION
The Car Rental Booking System is designed to streamline the car rental process, making
it more accessible and efficient for users. Traditional car rental methods can often be
cumbersome, involving lengthy paperwork and complex procedures. This system aims to
simplify the experience by providing a user-friendly console application that allows
customers to easily select vehicles, specify rental durations, and manage bookings.
Through this application, users can quickly view available car options, receive instant
cost calculations, and confirm their reservations—all within a few simple steps.
Additionally, the system incorporates features such as discounts for longer rentals and the
ability to cancel bookings, enhancing flexibility and user satisfaction. By leveraging
modern programming techniques and data storage methods, this project not only meets
user needs but also sets a foundation for future enhancements in car rental management.
OBJECTIVES OF THE PROJECT
The primary objectives of the Car Rental Booking System are as follows:
1. User-Friendly Interface: To create an intuitive console application that guides
users seamlessly through the booking process, minimizing complexity.
2. Efficient Booking Management: To enable users to easily select cars, input rental
durations, and confirm bookings with minimal effort, thereby enhancing the
overall user experience.
3. Accurate Cost Calculation: To implement a reliable system that calculates rental
costs in real-time, including the application of discounts for rentals exceeding
specified durations.
4. Data Persistence: To ensure that booking details are stored in a JSON file,
allowing for easy retrieval and management of user information across multiple
sessions.
5. Flexible Cancellation Process: To provide users with the ability to cancel
bookings easily, giving them greater control over their rental experience and
accommodating changing plans.
6. Enhanced Customer Experience: To improve the overall satisfaction of users by
reducing wait times and streamlining the car rental process through technology.
PROPOSED SYSTEM.
PLANNING PHASE OF THE DEVELOPMENT CYCLE
The planning phase is an important first step in creating our Car Rental Booking System.
In this phase, we focused on figuring out what we wanted to achieve with the project,
what features we needed, and what resources we would require to finish it successfully.
We did some research to understand what users, like customers and instructors, expect
from a car rental system. This helped us design our system better.
We listed the main features we wanted to include, such as how users would interact with
the system, how they would select cars, how costs would be calculated, and how
bookings would be managed. We also created a timeline for our project, marking
important milestones for each stage, including analysis, design, coding, testing, and
launching the system. This organized approach helped us stay on track and tackle any
challenges that came up. Overall, the planning phase laid a strong foundation for the rest
of the project, making sure our development work matched what users needed and what
we aimed to achieve.
PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE
Design: In this phase, we create a blueprint for the system. We decide how the user
interface will look and how all the parts of the system will fit together. This is like
drawing a map before building a house.
1. Implementation: Now comes the exciting part: coding! We build the Car Rental
Booking System by writing the actual code based on our designs. This is where all
our ideas start to come to life.
2. Testing: Once we’ve built the system, we need to test it to make sure everything works
correctly. We check for bugs (errors) and gather feedback from users to see if there are any
improvements we can make.
3. Deployment: After testing, we’re ready to launch the system! This means we make it
available for users to start using. We might also provide training to help users understand
how to use it effectively.
4. Maintenance: Even after the system is live, our work isn’t done. We continue to monitor the
system for any issues and fix them as needed. This ensures the system stays updated and
continues to meet users’ needs.
SYSTEM CONCEPT DEVELOPMENT PHASE
The System Concept Development Phase is an important part of our project where we outline the
main ideas and features of the Car Rental Booking System. In this phase, we focus on understanding
the overall purpose of the system and how it will work. Here’s what we typically do:
1. Identifying User Needs: We start by thinking about who will use the system and what they
need. For example, customers need an easy way to book cars, while administrators may want
to manage bookings and track vehicle availability.
2. Defining Key Features: Based on our understanding of user needs, we list the key features
that the system should include. This might involve allowing users to select cars, enter rental
durations, calculate costs, and confirm bookings.
3. Creating a System Overview: We develop a high-level overview of how the system will
function. This includes describing how users will interact with the system and how different
components (like the booking interface and data storage) will work together.
4. Sketching User Interfaces: To visualize the system, we can create rough sketches or
mockups of what the user interface will look like. This helps us think about how users will
navigate the system and what information they will see.
5. Establishing Project Goals: Finally, we set clear goals for what we want to achieve with the
system. This could include improving user satisfaction, making the booking process faster, or
reducing errors in reservations.
Pictorial Representation of SDLC
PLANNING PHASE
The Planning Phase is a crucial first step in developing the Car Rental Booking System, where we
establish the foundation for the entire project. We begin by defining our project goals, clearly stating
what we aim to achieve, such as creating a user-friendly booking process and providing accurate cost
calculations. Next, we identify user needs by gathering information about potential users—customers
and administrators—to understand their expectations and requirements. This helps us outline the
project scope, determining which features will be included, like car selection and booking
management, while also clarifying what will not be part of this version. Resource planning is also
essential, as we assess the tools, software, and technology needed to complete the project, along with
considering time and budget constraints. To stay organized, we create a timeline that includes
milestones for each phase of development, ensuring we complete tasks on schedule. Additionally, we
conduct a risk assessment to identify potential challenges that could impact the project, allowing us
to formulate strategies to mitigate them. Finally, we document all our discussions and plans in a
project proposal or requirements document, serving as a reference throughout the development
process. By thoroughly completing the Planning Phase, we ensure a clear direction for the project,
setting us up for success in the subsequent stages of development.
REQUIREMENTS ANALYSIS PHASE
The Requirements Analysis Phase is a critical step in the development of the Car Rental Booking
System, where we gather and define the specific needs and expectations of users. During this phase,
we conduct detailed discussions with potential users, including customers and administrators, to
understand their requirements for the system. We focus on identifying key functionalities, such as the
ability to select cars, specify rental durations, calculate costs, and manage bookings. This involves
creating use cases and user stories to capture how different users will interact with the system.
Additionally, we prioritize the features based on user needs, ensuring that the most important
functions are developed first. We also analyze any technical constraints or limitations that may
impact the implementation of these features. By documenting all gathered requirements in a clear
and organized manner, we create a requirements specification document that serves as a reference for
the design and development phases. This thorough analysis helps ensure that the final system will
meet user expectations and provides a solid foundation for the next steps in the project.
DESIGN PHASE
The Design Phase is a pivotal step in the development of the Car Rental Booking System, where we
translate the requirements gathered in the previous phase into a detailed blueprint for the system.
During this phase, we focus on creating the overall architecture of the application, defining how
different components will interact with each other. This includes designing the user interface, where
we sketch layouts and create wireframes to visualize how users will navigate the system and access
various features, such as car selection and booking management. We also outline the database
structure, detailing how user information, booking data, and vehicle details will be stored and
accessed. Additionally, we establish the technical specifications, including programming languages,
frameworks, and tools that will be used in the development process. To ensure clarity and alignment
among team members, we document all design decisions and create diagrams, such as flowcharts and
data flow diagrams, to illustrate the system’s functionality and data flow. This comprehensive design
process ensures that we have a clear plan to follow during the implementation phase, setting the
stage for successful development and ultimately a user-friendly system that meets the identified
requirements.
DEVELOPMENT PHASE
The Development Phase is where the actual building of the Car Rental Booking System takes place,
transforming our designs and plans into a functioning application. During this phase, we write the
code based on the specifications outlined in the design documents. This involves developing various
components of the system, such as the user interface, backend logic, and database connections. Each
feature, including car selection, booking management, and cost calculations, is implemented using
appropriate programming languages and frameworks. Regular code reviews and team collaboration
are essential during this phase to ensure quality and consistency across the project. We also integrate
all components to create a cohesive system, ensuring that they work together smoothly. As
development progresses, we continuously test individual modules to identify and fix any bugs or
issues early on, which helps streamline the later testing phase. By the end of the Development Phase,
we aim to have a complete version of the Car Rental Booking System that is ready for thorough
testing, laying the groundwork for a reliable and user-friendly application.
INTEGRATION AND TEST PHASE
The Integration and Test Phase is a crucial step in the development of the Car Rental Booking
System, where we bring together all components of the application and ensure that they function as
intended. During this phase, we integrate the individual modules developed in the previous phase,
combining the user interface, backend logic, and database functionalities into a single cohesive
system. Once integrated, we conduct comprehensive testing to identify and resolve any issues. This
includes functional testing to verify that each feature works according to the specifications, as well as
performance testing to ensure the system operates efficiently under various conditions. We also
perform usability testing, gathering feedback from potential users to assess the system’s user-
friendliness and overall experience. Additionally, regression testing is carried out to confirm that
new changes haven’t affected existing functionalities. By documenting and addressing any bugs or
discrepancies that arise during this phase, we ensure a robust and reliable system. Ultimately, the
Integration and Test Phase ensures that the Car Rental Booking System is ready for deployment,
meeting quality standards and user expectations.
IMPLEMENTATION PHASE
The Implementation Phase marks the point where the Car Rental Booking System is deployed for
actual use, transitioning from development to a live environment. During this phase, we focus on
installing the application and configuring it for the users. This involves setting up the necessary
infrastructure, including servers and databases, and ensuring that the system operates correctly in its
intended environment. We provide training sessions for users, demonstrating how to navigate the
system and utilize its features effectively. Additionally, we create user manuals and documentation
to assist users in understanding the functionalities available to them. As the system goes live, we
closely monitor its performance, addressing any immediate issues that arise to ensure a smooth user
experience. Feedback from users is actively collected during this time to identify any areas for
improvement. By the end of the Implementation Phase, the Car Rental Booking System should be
fully operational, enabling users to book vehicles seamlessly and efficiently while providing us with
valuable insights for future enhancements.
OPERATION AND MAINTENANCE PHASE
The Operation and Maintenance Phase is the final stage in the development of the Car Rental
Booking System, focusing on ensuring the system runs smoothly and continues to meet user needs
over time. Once the system is live, we monitor its performance to identify any issues or bugs that
may arise in real-world use. This phase involves regular maintenance tasks, such as applying
updates, fixing bugs, and making enhancements based on user feedback. We also gather analytics
and usage data to understand how users interact with the system, which can inform future
improvements. User support is a key aspect of this phase; we establish channels for users to report
issues and seek assistance. Additionally, we may conduct periodic reviews to assess system
performance and explore opportunities for new features or upgrades that can enhance the user
experience. By prioritizing ongoing operation and maintenance, we ensure that the Car Rental
Booking System remains reliable, efficient, and aligned with evolving user expectations, ultimately
contributing to long-term satisfaction and success.
SOURCE CODE
import json
def display_welcome():
print("Welcome to the Car Rental Booking System!")
print("===========================================")
def display_cars():
print("\nAvailable Cars:")
print("1. Sedan - $30 per day")
print("2. SUV - $50 per day")
print("3. Truck - $70 per day")
print("4. Convertible - $90 per day")
print("5. Minivan - $80 per day")
def calculate_total_cost(car_type, days):
rates = {
'1': 30,
'2': 50,
'3': 70,
'4': 90,
'5': 80
cost = rates[car_type] * days
# Apply a discount for rentals longer than 7 days
if days > 7:
cost *= 0.9 # 10% discount
return cost
def get_customer_details():
name = input("Enter your name: ")
phone = input("Enter your phone number: ")
email = input("Enter your email address: ")
return {'name': name, 'phone': phone, 'email': email}
def confirm_booking(car_type, days, total_cost, customer_info):
print(f"\nYou have chosen option {car_type}.")
print(f"Number of days: {days}")
print(f"Total cost: ${total_cost:.2f}")
print(f"Customer Details: {customer_info['name']}, {customer_info['phone']}, {customer_info['email']}")
confirmation = input("Do you want to confirm your booking? (yes/no): ")
return confirmation.lower() == 'yes'
def save_bookings(bookings):
with open("bookings.json", "w") as f:
json.dump(bookings, f)
def load_bookings():
try:
with open("bookings.json", "r") as f:
return json.load(f)
except FileNotFoundError:
return []
def cancel_booking(bookings):
booking_id = int(input("Enter the booking ID to cancel: "))
if 0 <= booking_id < len(bookings):
bookings.pop(booking_id)
print("Booking canceled successfully.")
else:
print("Invalid booking ID.")
def rental_car_booking():
bookings = load_bookings() # Load previous bookings
display_welcome()
while True:
display_cars()
choice = input("Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: ")
if choice.lower() == 'q':
print("Thank you for using our rental car booking system!")
save_bookings(bookings) # Save bookings to a file
break
if choice.lower() == 'c':
cancel_booking(bookings)
continue
if choice in ['1', '2', '3', '4', '5']:
try:
days = int(input("Enter the number of days you want to rent the car: "))
if days <= 0:
print("Please enter a valid number of days.")
continue
total_cost = calculate_total_cost(choice, days)
customer_info = get_customer_details()
if confirm_booking(choice, days, total_cost, customer_info):
bookings.append({
'car_type': choice,
'days': days,
'total_cost': total_cost,
'customer_info': customer_info
})
print("Your booking has been confirmed. Enjoy your ride!")
else:
print("Booking has been canceled.")
except ValueError:
print("Please enter a valid number of days.")
else:
print("Invalid choice. Please select a valid car option.")
print("\nCurrent Bookings:")
for idx, booking in enumerate(bookings):
print(f"[{idx}] Car Type: {booking['car_type']}, Days: {booking['days']}, Total Cost: $
{booking['total_cost']:.2f}, Customer: {booking['customer_info']['name']}")
if __name__ == "__main__":
rental_car_booking()
OUTPUT
Welcome to the Car Rental Booking System!
===========================================
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: 2
Enter the number of days you want to rent the car: 3
Enter your name: Vaibhav
Enter your phone number: 9874561023
Enter your email address: vaibhav@gmail.com
You have chosen option 2.
Number of days: 3
Total cost: $150.00
Customer Details: Vaibhav, 9874561023, vaibhav@gmail.com
Do you want to confirm your booking? (yes /no): yes
Your booking has been confirmed. Enjoy your ride!
Current Bookings:
[0] Car Type: 2, Days: 3, Total Cost: $150.00, Customer: Vaibhav
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: 4
Enter the number of days you want to rent the car: 5
Enter your name: Karthikeyan
Enter your phone number: 9874510263
Enter your email address: karthikeyan@gmail.com
You have chosen option 4.
Number of days: 5
Total cost: $450.00
Customer Details: Karthikeyan, 9874510263, karthikeyan@gmail.com
Do you want to confirm your booking? (yes /no): yes
Your booking has been confirmed. Enjoy your ride!
Current Bookings:
[0] Car Type: 2, Days: 3, Total Cost: $150.00, Customer: Vaibhav
[1] Car Type: 4, Days: 5, Total Cost: $450.00, Customer: Karthikeyan
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: 3
Enter the number of days you want to rent the car: 1
Enter your name: Thugin
Enter your phone number: 8745910236
Enter your email address: thugin@gmail.com
You have chosen option 3.
Number of days: 1
Total cost: $70.00
Customer Details: Thugin, 8745910236, thugin@gmail.com
Do you want to confirm your booking? (yes/no): yes
Your booking has been confirmed. Enjoy your ride!
Current Bookings:
[0] Car Type: 2, Days: 3, Total Cost: $150.00, Customer: Vaibhav
[1] Car Type: 4, Days: 5, Total Cost: $450.00, Customer: Karthikeyan
[2] Car Type: 3, Days: 1, Total Cost: $70.00, Customer: Thugin
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit:
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: c
Enter the booking ID to cancel: 1
Booking canceled successfully.
Available Cars:
1. Sedan - $30 per day
2. SUV - $50 per day
3. Truck - $70 per day
4. Convertible - $90 per day
5. Minivan - $80 per day
Choose a car (1-5), 'c' to cancel a booking, 'q' to quit: c
Enter the booking ID to cancel: 2
Invalid booking ID.
Percentage
Planning
Requirements Analysis
Design
Development
where we check to make sure everything works correctly before the system is used by real
customers. The goal of testing is to find and fix any problems, ensuring that users have a smooth
experience when booking cars.
Why Testing is Important
Testing helps us to:
Find Bugs: Just like in a video game, where you might find glitches, our system can have bugs that
need fixing. Testing helps us spot these issues.
Ensure Functionality: We need to make sure that every feature, like searching for cars or completing
a booking, works just like we planned.
Improve User Experience: We want users to find the system easy to use. Testing helps us identify
parts that might be confusing so we can make improvements.
Types of Testing
1. Unit Testing: This is the first step where we test small parts of the system, like checking if a
button works or if the price calculation is correct.
2. Integration Testing: After testing the small parts, we check how they work together. For
example, we test if selecting a car leads to the correct booking page.
3. Functional Testing: Here, we make sure that all the features do what they are supposed to
do. We check if a user can book a car without any problems.
4. Usability Testing: We invite real users to try the system and give feedback. This helps us see
if they find it easy and enjoyable to use.
5. Performance Testing: We test how the system performs when many people use it at the
same time. We want to make sure it doesn’t slow down or crash.
6. Regression Testing: After making changes to fix bugs or add new features, we test
everything again to ensure that nothing else was broken in the process.
Testing Steps
1. Plan the Tests: We start by writing down what we need to test and how we will do it. This
helps keep us organized.
2. Create Test Cases: We write specific instructions for each test. For example, a test case
might say, "Check if a user can book a car for tomorrow."
3. Run the Tests: We go through each test case and check if everything works as expected. If
we find any problems, we take notes.
4. Fix the Issues: Once we identify any bugs, we work on fixing them. This might mean
changing some code or adjusting how things work.
5. Check Again: After fixing the issues, we test everything one more time to ensure that all
problems have been resolved.
Final Review: Before launching the system, we conduct a final review to confirm that everything is ready for
users.
Conclusion
The Testing Phase is essential for making sure the Car Rental Booking System is ready to use. By
carefully checking each part of the system, we can ensure that it works correctly and provides a good
experience for users. Testing helps us find and fix problems, making the final product reliable and
user-friendly. This phase is a key step in delivering a successful car rental system that customers
will enjoy using!
HARDWARE AND SOFTWARE REQUIREMENTS
When creating the Car Rental Booking System, it’s important to have the right hardware and
software. Since you’re using Windows and an online Python compiler, here’s what you need:
Hardware Requirements
1. Computer:
o Processor: A modern processor (like Intel Core i3 or better) is recommended to run
applications smoothly.
o RAM: At least 4 GB of RAM is suggested for basic tasks. More RAM (8 GB or more) is better if
you plan to run multiple applications at once.
o Storage: You’ll need enough storage space on your hard drive (at least 100 GB free) for your
files and projects.
2. Internet Connection:
o A stable internet connection is essential for accessing the online Python compiler. A speed of
5 Mbps or higher is usually sufficient for coding and testing.
Software Requirements
1. Operating System:
o You will be using Windows 10 or later. This ensures compatibility with most software and
online tools.
2. Web Browser:
o You will need a modern web browser like Google Chrome, Mozilla Firefox, or Microsoft Edge.
This allows you to access the online Python compiler easily.
3. Online Python Compiler:
o Choose an online compiler like Replit, Programiz, or OnlineGDB. These platforms let you
write and run Python code directly in your browser without needing to install Python on
your computer.
Using the Online Python Compiler
Accessing the Compiler: Open your web browser and go to the website of your chosen online
Python compiler.
Writing Code: You can start writing your Python code in the provided text area.
Running Your Code: After writing your code, click the "Run" button to see the output. This allows
you to test your program instantly.
Saving Your Work: Most online compilers allow you to save your work in your account or share it
with others easily.
BIBLIOGRAPHY
Computer Science with python – Class X11 By :