0% found this document useful (0 votes)
3 views29 pages

C++ Report

The document presents a mini project report on a 'Movie Ticket Booking System' developed by students at Visvesvaraya Technological University. This console-based application, created using C++, allows users to view and reserve seats in a cinema hall, implementing core programming concepts such as arrays and functions. The project aims to enhance understanding of C++ while providing a foundation for future enhancements like pricing and user accounts.

Uploaded by

sonyramesh2024
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)
3 views29 pages

C++ Report

The document presents a mini project report on a 'Movie Ticket Booking System' developed by students at Visvesvaraya Technological University. This console-based application, created using C++, allows users to view and reserve seats in a cinema hall, implementing core programming concepts such as arrays and functions. The project aims to enhance understanding of C++ while providing a foundation for future enhancements like pricing and user accounts.

Uploaded by

sonyramesh2024
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/ 29

VISVESVARAYA TECHNOLOGICAL UNIVERSITY,

BELAGAVI-590018
A
MINI PROJECT REPORT ON
“Movie Ticket Booking System”

PROJECT ASSOCIATES

Name: USN:
Varsha Karajgimath 2KE12CS172
Shweta 2KE12CS143
Shreenidhi Tuppad 2KE12CS135
Sony Chavan 2KE12CS153

Under the Guidance


Prof. Mrs.Vanita
Professor

Department of Computer Science


K. L. E. Institute of Technology, Hubballi-27
Opp. Airport,Gokul,Hubballi-58002
2024-2025
Certificate
Certified that the mini project work entitled “Movie Tickect Booking
System” is a bonafide work carried out by Sony Chavan
(2KE24CS153),Shweta(2KE24CS143),Shreenidhi(2KE24CS135),
Varsha Karajgimath(2KE24CS172), in partial fulfillment for the
award of degree of Bachelor of Engineering in Semester, Computer
Science and Engineering of KLE Institute of Technology , during the
year 2024-25. It is certified that all corrections/suggestions indicated
for internal assessment have been incorporated in the report deposited
in the department library.

Signature of the Guide Signature of the Hod


(Mr.Vanita) (Mr.Rajesh Y)

Signature of the Principal


(Mr.T.Manu)
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to my subject teacher, Mrs Vanita,
for assigning us this mini project on "Movie Ticket Booking System" as part
of the course Introduction to C++. This project has been a valuable learning
experience and has helped me apply theoretical concepts in a practical and
engaging way.
I am thankful for the continuous support, guidance, and encouragement
provided by our instructor throughout the development of this project. Their
insights and feedback were instrumental in improving the structure and logic of
the program.
I also extend my heartfelt thanks to my classmates and friends who supported
me with suggestions and helped me test the system. Their constructive input
allowed me to make this project more user-friendly and functional.
Lastly, I would like to thank my family for their patience and encouragement
during the time I spent working on this project. Completing this project has not
only enhanced my understanding of C++ programming but has also boosted my
confidence in solving real-world problems through coding.

Name of theStudents
Sony Chavan
Shweta
Shreenidhi Tuppad
Varsha Karajgimath
Abstract
This project, titled "Movie Ticket Booking System", is a
simple console-based application developed using the C++
programming language. The system simulates the process of
reserving seats in a cinema hall by allowing users to view the
seating arrangement, select a specific seat by row and column,
and book it if available. Once reserved, the seat is marked as
occupied, preventing any further bookings of the same seat.
The project uses fundamental concepts of C++ such as arrays,
loops, conditional statements, functions, and character
manipulation to build the logic for seat reservation. A 2D array
is used to represent the seating layout, where each element
indicates whether a seat is booked or available. The interface is
designed to be user-friendly, prompting users for input and
providing clear feedback.
This project serves as a practical implementation of
programming concepts taught in the subject Introduction to
C++. It demonstrates how basic C++ features can be used to
develop real-world applications and emphasizes the importance
of input validation, data representation, and user interaction.
While the project is simple in scope, it lays the groundwork for
more advanced systems that could include features like pricing,
payment processing, user accounts, and graphical interfaces.
Contents
Certificate i
Declaration ii
Acknowledgement iii
Abstract iv

Chapter No. Chapter Name Page no.


1. Introduction
2. Objectives
3. System Requirements
4. Problem Definition
5. System Design
6. Code Implementation
7. Output and Screenshots
8. Challenges Faced
9. Future Enhancements
10. Conclusion
11. References
12. Appendix
Introduction
In the modern era of technology, software systems have become a vital
part of various industries, helping automate tasks, reduce human errors,
and improve overall efficiency. One such area where automation has
made a significant impact is in the field of entertainment and cinema.
Earlier, booking a movie ticket required a person to physically visit a
cinema hall and wait in long queues. This process was time-consuming,
inconvenient, and prone to manual errors such as overbooking or ticket
duplication. Today, with the help of computer-based ticket booking
systems, users can reserve seats quickly and accurately, even from the
comfort of their homes.
This project, titled "Movie Ticket Booking System", is a console-
based application developed using the C++ programming language.
It serves as a mini project for the subject Introduction to C++, where
the primary aim is to demonstrate how basic programming concepts
can be used to design a real-world application. The system allows users
to view available seats in a movie theatre, select specific seats by
entering a row and column, and reserve them if they are not already
booked. Once booked, the seat is marked as unavailable, and the system
updates the seating chart accordingly.
The program utilizes fundamental C++ features such as:
• Two-dimensional arrays to represent the seating layout.
• Loops to iterate over the rows and columns.
• Conditional statements to check for seat availability.
• Functions to separate logic and make the code modular and
readable.
• Character manipulation to allow row selection using letters (A
to E).
By building this project, students gain practical experience in
problem-solving, logic building, and applying theoretical knowledge .
Objectives

The primary aim of the "Movie Ticket Booking System" project is


to implement a simple yet functional ticket booking mechanism using
the C++ programming language. This project serves as an opportunity
to apply the programming concepts learned in the subject
Introduction to C++ through a real-world application. The key
objectives of this project are outlined below:
1. Understanding Practical Application of C++
• To apply core C++ concepts such as arrays, loops, functions,
and conditional statements in building a working program.
• To enhance the understanding of console-based input and output
techniques.
2. Simulating a Real-World Booking System
• To create a basic version of a movie theatre ticket booking
system that mimics how users select and reserve seats in a
cinema.
• To visualize and manage seat availability using a two-
dimensional layout.
3. Improving Problem-Solving Skills
• To break down a real-life problem into manageable parts and
implement it using step-by-step logic.
• To design a solution that prevents double booking and ensures
user input validation.
4. Promoting Modular Programming
• To divide the code into functions like display() and reservation()
for better code readability and maintainability.
• To encourage reusability of code by using well-structured
functions.
5. Enhancing User Interaction
• To develop a user-friendly console interface that displays clear
instructions and feedback after each action.
• To implement a loop-based mechanism that allows multiple
bookings until the user chooses to exit.
6. Providing a Foundation for Future Development
• To build a simple program that can be easily expanded in the
future to include features such as:
o Pricing of seats
o Show timings
o Different categories of seats (e.g., VIP, Standard)
o User login and registration systems
o Graphical interface for better user experience
7. Encouraging Independent Project Development
• To foster self-learning by encouraging students to design, code,
test, and debug a complete mini project independently or in
small teams.
• To prepare students for larger software development projects in
future semesters.
System Requirements

The primary aim of the "Movie Ticket Booking System" project is


to implement a simple yet functional ticket booking mechanism using
the C++ programming language. This project serves as an opportunity
to apply the programming concepts learned in the subject
Introduction to C++ through a real-world application. The key
objectives of this project are outlined below:

1. Understanding Practical Application of C++


• To apply core C++ concepts such as arrays, loops, functions,
and conditional statements in building a working program.
• To enhance the understanding of console-based input and output
techniques.

2. Simulating a Real-World Booking System


• To create a basic version of a movie theatre ticket booking
system that mimics how users select and reserve seats in a
cinema.
• To visualize and manage seat availability using a two-
dimensional layout.

3. Improving Problem-Solving Skills


• To break down a real-life problem into manageable parts and
implement it using step-by-step logic.
• To design a solution that prevents double booking and ensures
user input validation.

4. Promoting Modular Programming


• To divide the code into functions like display() and reservation()
for better code readability and maintainability.
• To encourage reusability of code by using well-structured
functions.
5. Enhancing User Interaction
• To develop a user-friendly console interface that displays clear
instructions and feedback after each action.
• To implement a loop-based mechanism that allows multiple
bookings until the user chooses to exit.
6. Providing a Foundation for Future Development
• To build a simple program that can be easily expanded in the
future to include features such as:
o Pricing of seats
o Show timings
o Different categories of seats (e.g., VIP, Standard)
o User login and registration systems
o Graphical interface for better user experience
7. Encouraging Independent Project Development
• To foster self-learning by encouraging students to design, code,
test, and debug a complete mini project independently or in
small teams.
• To prepare students for larger software development projects in
future semesters.
Problem Definition

In traditional cinema halls, booking a movie ticket often required


people to stand in long queues and manually check for available seats
at the counter. This process was not only time-consuming but also
prone to human error, such as overbooking, miscommunication, and
lack of proper seat management. As the entertainment industry moves
toward digital solutions, there is a need for a simple yet effective
system to automate the seat booking process and improve user
convenience.
This project aims to address the need for a basic, console-based
Movie Ticket Booking System using the C++ programming
language. The system should allow users to interact with the seating
layout of a theatre and perform operations such as checking available
seats and reserving them. Once a seat is booked, it must be marked as
unavailable, and the system should prevent users from booking the
same seat again.

Key Problems to be Solved:


1. Seat Availability Representation:
o A clear and accurate way to represent the current status
(booked or available) of each seat in the theatre.
2. User-Friendly Interaction:
o Allow users to easily select seats using a combination of
row (A–E) and column (1–10).
o Prompt the user for valid input and give appropriate
feedback.
3. Preventing Duplicate Bookings:
o Ensure that once a seat is reserved, it cannot be booked
again.
o Display an appropriate message if the selected seat is
already occupied.
4. Dynamic Seat Updates:
o After each booking, the seat layout should be updated in
real-time to reflect the current availability.
5. Multiple Bookings:
o Enable users to book multiple seats in a single session
until they choose to exit the program.
6. Input Validation:
o Ensure that the input row and column are within the
allowed range (Row A–E and Column 1–10).
o Prevent the system from crashing or behaving
unexpectedly due to invalid inputs.

Scope of the Problem:


The problem scope is limited to a single movie show with a fixed
number of rows and columns (5 rows × 10 columns). The system is
designed for use in a basic, command-line interface and does not
include advanced features like payment, user accounts, or show
scheduling. However, this foundational version can be expanded in
the future to accommodate additional functionalities.
System Design
The System Design of the Movie Ticket Booking System outlines the
structure, flow, and components involved in developing the
application. It defines how the different parts of the system interact
with each other and how the overall process of seat reservation is
managed using basic features of the C++ programming language.
This project follows a modular design approach, where the program
is divided into different functions responsible for specific tasks. The
design is kept simple and suitable for a text-based interface to meet
the requirements of a beginner-level C++ mini project.

1. System Components
a. Seating Layout Representation
• A 2D array bool seats[5][10] is used to represent the seating
layout.
• Each seat is marked as:
o false → available
o true → booked
b. Display Module
• Function: display(bool seats[Row][Col])
• Clears the console and prints the current seating arrangement.
• Uses characters A to E for rows and numbers 1 to 10 for
columns.
• Booked seats are shown as X, and available seats as -.
c. Reservation Module
• Function: reservation(bool seats[Row][Col], char row, int col)
• Accepts user input (row and column), checks seat availability.
• If available, marks the seat as booked.
• If already booked, displays an appropriate message.
d. Main Control Loop
• Function: main()
• Continuously prompts the user for seat input.
• Performs input validation to ensure valid row (A–E) and column
(1–10).
• Calls the reservation and display functions accordingly.
• Asks the user if they want to book more seats (Y/N).

2. User Interaction Flow


pgsql
CopyEdit
Start

Display seat layout

Prompt for row and column

Validate input

Check seat availability
→ If booked → Display error message
→ If available → Book the seat

Update seat layout

Ask if user wants to continue
→ If Yes → Repeat
→ If No → Exit

3. Design Considerations
• Simplicity: Since the project is designed for beginners, the
interface and code are kept straightforward and easy to
understand.
• Modularity: Use of functions separates concerns and improves
readability.
• Reusability: Functions can be reused if additional features are
added in the future.
• Scalability: While currently fixed to 5 rows and 10 columns, the
logic can easily be modified to support larger theatres.

Future Enhancements (Optional Design Ideas)


• Add a pricing system (different prices for rows).
• Add user authentication for booking history.
• Include date and time of show selection.
• Develop a GUI version using graphics or a framework.
Code Implementation
The Movie Ticket Booking System is implemented using basic
concepts of C++ programming such as 2D arrays, input/output
operations, control structures, and modular functions. The goal of the
implementation is to allow users to view available seats, reserve them,
and prevent double bookings in a cinema hall with 5 rows and 10
columns.
Below is the complete C++ code for the system, along with
explanations for each section:
#include <iostream>
#include <iomanip> // For setw() formatting
using namespace std;

const int Row = 5; // Total number of rows (A–E)


const int Col = 10; // Total number of columns (1–10)

// Function to display the seating layout


void display(bool seats[Row][Col]) {
system("cls"); // Clears the console screen (platform-specific)

cout << " ";


for (int i = 1; i <= Col; i++) {
cout << setw(3) << i; // Column headers
}
cout << endl;
for (int i = 0; i < Row; i++) {
cout << static_cast<char>('A' + i) << " "; // Row label
for (int j = 0; j < Col; j++) {
if (seats[i][j]) {
cout << setw(3) << "X"; // Booked seat
} else {
cout << setw(3) << "-"; // Available seat
}
}
cout << endl;
}
}

// Function to reserve a seat


void reservation(bool seats[Row][Col], char row, int col) {
int rowIndex = row - 'A';
if (seats[rowIndex][col - 1]) {
cout << "Seat is already reserved!" << endl;
} else {
seats[rowIndex][col - 1] = true;
cout << "You have successfully reserved the seat." << endl;
}
}
// Main function
int main() {
bool seats[Row][Col] = {false}; // Initialize all seats as available
char row;
int col;

display(seats); // Show initial seat layout

while (true) {
cout << "Enter Row (A–E): ";
cin >> row;

cout << "Enter Column (1–10): ";


cin >> col;

// Input validation
if (row < 'A' || row > 'E' || col < 1 || col > 10) {
cout << "Invalid row or column. Please try again." << endl;
continue;
}

reservation(seats, row, col); // Attempt to book the seat


display(seats); // Update seating layout

char choice;
cout << "Do you want to book more seats? (Y/N): ";
cin >> choice;

if (choice != 'Y' && choice != 'y') {


break;
}
}

return 0;
}

Key Features of the Code:


• Display Function: Shows the current status of all seats in a
clear tabular format. Booked seats are marked as 'X', available
ones as '-'.
• Reservation Function: Takes row and column input, checks if
the seat is already reserved, and books it if available.
• Input Validation: Ensures the user enters valid values for both
row and column to prevent array errors.
• Looped Booking: Allows the user to book multiple seats in one
session until they decide to exit.
• Modularity: Use of separate functions improves readability and
maintainability.
Output Pictures
Challenges Faced
While developing the Movie Ticket Booking System using C++,
several challenges were encountered. These challenges not only tested
our understanding of programming concepts but also helped us gain
practical experience in solving real-world problems through code.
Below are some of the key challenges we faced during the
development process:

1. Seat Mapping and Representation


Challenge:
Designing a data structure that could accurately represent the seating
layout of a movie hall in a way that allows easy tracking of booked
and available seats.
Solution:
We used a 2D boolean array seats[5][10], where each element
represents the booking status of a seat. A value of false indicates an
available seat, and true indicates a booked one.

2. User Input Validation


Challenge:
Ensuring that users enter valid seat coordinates, such as a row
between 'A' to 'E' and a column between 1 to 10. Without proper
validation, the program could access invalid memory locations and
crash.
Solution:
We added strict conditions in the main loop to verify that both row
and column inputs are within the valid range. If an invalid input is
detected, the user is prompted to re-enter.
3. Preventing Duplicate Bookings
Challenge:
Avoiding multiple users from booking the same seat more than once,
which would otherwise affect the integrity of the booking system.
Solution:
The reservation() function first checks if the seat is already booked
using a conditional statement. If the seat is taken, it displays a
message and skips booking.

4. Updating the Display in Real Time


Challenge:
After every booking, the updated seating layout needed to be
displayed clearly and without clutter. Keeping the console clean and
intuitive was important for a better user experience.
Solution:
We used the system("cls") command to clear the screen before each
update (on Windows systems) and displayed the updated seat layout
using formatted output from the <iomanip> library.

5. Maintaining Code Simplicity and Modularity


Challenge:
Keeping the code simple and readable while dividing it into logical
modules or functions. It was important to avoid writing all logic in the
main() function.
Solution:
We separated the functionality into two main functions: display() for
showing the seat layout and reservation() for handling bookings. This
made the code cleaner and easier to maintain.
6. Platform Compatibility
Challenge:
Using system("cls") to clear the console screen works on Windows
but not on other operating systems like Linux or macOS.
Solution:
Since the project was developed on a Windows platform,
system("cls") worked as intended. However, we made a note that in
other environments, alternatives like system("clear") or platform
checks would be necessary.

7. Scalability and Future Expansion


Challenge:
The current system is limited to a single screen and show. Scaling it to
include multiple shows, movies, timings, or even payment would
require a much more complex structure.
Solution:
We designed the code in such a way that it can be expanded in the
future—for example, by turning the seat array into a class or using file
handling to store user data persistently.

These challenges helped reinforce our understanding of control


structures, arrays, functions, and logical problem solving in C++.
Overcoming them gave us practical insights into how even simple
software applications must be carefully designed to work correctly
and efficiently.
Future Enhancement
While the current version of the Movie Ticket Booking System is
functional and successfully allows users to reserve seats in a movie
hall, it is a basic implementation developed for educational purposes.
There are several ways in which this system can be enhanced to make
it more practical, scalable, and user-friendly. These enhancements
would help simulate real-world ticket booking platforms and provide
a richer user experience.
Below are some of the potential future enhancements:

1. Graphical User Interface (GUI)


Current Limitation:
The system operates entirely in a text-based console, which limits
usability, especially for non-technical users.
Enhancement Suggestion:
Integrating a GUI using libraries like Qt, SFML, or even web-based
tools can improve interaction. A visual layout of seats, buttons for
booking, and popup messages would enhance user experience.

2. Multiple Shows and Movies


Current Limitation:
The system supports only one screen and one movie show.
Enhancement Suggestion:
Allow users to select from multiple movies, show timings, and
screens. Each movie can have a separate seat layout and booking
status. This could be implemented using arrays of structures or
classes.
3. User Authentication and Profiles
Current Limitation:
There is no user login system or personalized user data.
Enhancement Suggestion:
Implementing user registration and login would allow customers to
manage their bookings, see booking history, and cancel or reschedule
seats. This would involve file handling or database integration.

4. Payment Integration
Current Limitation:
The system does not handle any payments or price calculations.
Enhancement Suggestion:
Add functionality to calculate total cost based on seat selection and
allow integration with mock payment methods or real ones through
APIs, for more realism.

5. Ticket Cancellation and Modification


Current Limitation:
Once a seat is booked, there is no way to cancel or modify the
booking.
Enhancement Suggestion:
Add options for users to cancel previously reserved seats or change
their selection. This would involve additional input handling and seat
status updates.
Conclusion
The Movie Ticket Booking System developed in C++ serves as a
practical implementation of fundamental programming concepts such
as arrays, functions, loops, conditionals, and input/output operations.
Through this project, we have successfully simulated a simple but
functional seat reservation system for a movie theater, allowing users
to view available seats, make reservations, and prevent double
bookings.
This project provided valuable hands-on experience in problem-
solving, code modularization, and user input handling. It emphasized
the importance of validating user input, maintaining clear output
formatting, and ensuring the logical accuracy of program flow.
Although the system is basic, it lays a strong foundation for
understanding how larger, real-world applications—such as online
booking platforms—are structured and function. The challenges faced
during development also helped us learn how to approach software
design incrementally and improve upon existing features.
In conclusion, the project was not only a successful technical exercise
but also an important step toward building real-life applications using
C++. With further enhancements like GUI integration, payment
systems, data storage, and user management, this system has the
potential to evolve into a fully functional ticket booking application.
Reference
i. Balagurusamy, E. (2017). Object-Oriented Programming with
C++ (7th Edition). McGraw Hill Education.
A foundational textbook used for understanding C++ syntax,
functions, and structure used in the project.
ii. Stroustrup, B. (2013). The C++ Programming Language (4th
Edition). Addison-Wesley.
Authored by the creator of C++, this book was helpful for
deeper insights into language design and program structure.
iii. Assisted with logic implementation, especially array handling
and input/output operations.
iv. Stack Overflow. Discussion on Seat Booking Logic in C++ –
https://stackoverflow.com
Used to resolve common errors and improve the reservation
logic through community advice.
v. YouTube Tutorials – Channels like CodeWithHarry,
ProgrammingKnowledge, and Tech With Tim provided video
walkthroughs on C++ projects that inspired structural
improvements.
vi. Microsoft Developer Documentation –
https://learn.microsoft.com/en-us/cpp/
– Helped understand platform-specific functions like
system("cls").
Appendix
The appendix includes supplementary materials that support the
contents of this mini project report. These elements help in better
understanding the design, logic, and functionality of the system.

A. Program Specifications
• Project Title: Movie Ticket Booking System
• Language Used: C++
• Platform: Windows Console Application
• Main Features:
o Displaying seat layout
o Booking available seats
o Preventing double booking
o Validating user input

B. Seat Structure Design


• Total Rows: 5 (A to E)
• Total Columns: 10 (1 to 10)
• Seat Status:
o 'X' → Booked
o '-' → Available

C. Sample Input & Output


Input Example:
mathematica
CopyEdit
Enter Row (A–E): B
Enter Column (1–10): 5
Output Example:
nginx
CopyEdit
You have successfully reserved the seat.

D. Functions Used
• display() – Shows the current seating layout
• reservation() – Reserves a seat if available
• main() – Controls the overall program flow

E. Tools and Libraries


• Header Files:
o <iostream> – For input/output
o <iomanip> – For formatted output (using setw())
• System Command:
o system("cls") – Clears the console (Windows only)

You might also like