100% found this document useful (1 vote)
574 views23 pages

Ajay Reddy

This document provides details about a project to develop a movie ticket booking system in C. The system allows users to browse movies and showtimes, select seats, pay for tickets, and receive an electronic ticket. Key aspects of the project include storing movie and booking records, validating user input, processing payments, and generating unique ticket IDs. The system aims to automate and enhance the ticket booking process for both users and administrators.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
574 views23 pages

Ajay Reddy

This document provides details about a project to develop a movie ticket booking system in C. The system allows users to browse movies and showtimes, select seats, pay for tickets, and receive an electronic ticket. Key aspects of the project include storing movie and booking records, validating user input, processing payments, and generating unique ticket IDs. The system aims to automate and enhance the ticket booking process for both users and administrators.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Koneru Lakshmaiah Education Foundation

(Deemed to be University)

FRESHMAN ENGINEERING DEPARTMENT


A Project Based Lab Report

On

MOVIE TICKET BOOKING IN C

SUBMITTED BY:

I.D NUMBER NAME

2300030352 K. Hansika

2300030406 M. V. K. Bhagya Sri

2300030514 P. Ajay Reddy

2300030530 P. Goutham Varma

UNDER THE GUIDANCE OF

Mr. G. VENKATESH

Asst professor,CSE.

KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES-1

CERTIFICATE

This is to certify that the project based laboratory report entitled


“MOVIE TICKET BOOKING IN C” submitted by P. Ajay Reddy bearing Regd. No.
2300030514 to the Department of Basic Engineering Sciences-1, KL
University in partial fulfillment of the requirements for the completion of a
project based Laboratory in “Computational Thinking for Structural Design”
course in I B Tech I Semester, is a bonafide record of the work carried out by him
under my supervision during the academic year 2023 – 2024.

PROJECT SUPERVISOR HEAD OF THE DEPARTMENT

Mr.G.VENKATESH Dr.D.Haritha
ACKNOWLEDGEMENTS

It is great pleasure for me to express my gratitude to our honorable


President Sri. Koneru Satyanarayana, for giving the opportunity and platform
with facilities in accomplishing the project based laboratory report.

I express the sincere gratitude to our Director Dr.A.Jagadeesh for his


administration towards our academic growth.

I express sincere gratitude to HOD-BES-1 Dr.D.Haritha for her leadership


and constant motivation provided in successful completion of our academic
semester. I record it as my privilege to deeply thank for providing us the efficient
faculty and facilities to make our ideas into reality.

I express my sincere thanks to our project supervisor Mr.G.VENKATESH


for him novel association of ideas, encouragement, appreciation and intellectual
zeal which motivated us to venture this project successfully.

Finally, it is pleased to acknowledge the indebtedness to all those who


devoted themselves directly or indirectly to make this project report success.

Project Associates

K. Hansika

M. V. K. Bhagya Sri

P. Goutham Varma
ABSTRACT

The Movie Ticket Booking System in C is a console-based application designed to facilitate


the booking of movie tickets for users. The system provides a user-friendly interface that
allows customers to browse available movies, view showtimes, and book tickets seamlessly.
The primary goal of this application is to automate the movie ticket booking process and
enhance the overall user experience. It is very useful for people to book ticket in online for
movie. It saves time, money, etc.
INDEX
S.NO TITLE PAGE NO

1 Introduction 1

2 Aim of the Project 2

2.1 Advantages & Disadvantages 2

2.2 Future Implementation 2

3 Software & Hardware Details 3

4 Flow Chart 4

5 Algorithm 5

6 Implementation 6

7 Integration and System Testing 11

8 Conclusion 18
INTRODUCTION

Concepts:

1.Structures:
•Use structures to represent entities like movies, theaters, bookings, and users.
This helps organize related data into a single unit.
2.Arrays:
•Utilize arrays to store lists of movies, theaters, available seats, and other
relevant information.
3.File Handling:
•Read and write data to files to persist information about movies, theaters, and
bookings. This allows your program to store data between different program runs.
4.Pointers:
•Use pointers to efficiently manage and manipulate data structures, especially
dynamic memory allocation for variable-sized data.
5.Functions:
•Organize your code into functions for modularity and reusability. Common
functions might include booking seats, displaying available movies, and handling user
input.
6.Arrays and Strings:
•Work with arrays and strings to handle user input and display information.
7.Conditional Statements (if/else):
•Implement conditional statements to control the flow of your program based
on user choices or system conditions.
8.Loops (for/while):
•Use loops for repetitive tasks, such as displaying a list of movies or iterating
through available seats.
9.Enums:
•Use enums to define constants for better code readability, such as movie
genres or seat status.
10.Error Handling:
•Implement error-checking mechanisms to handle unexpected situations and
provide appropriate feedback to users.
11.Dynamic Memory Allocation:
•Use functions like malloc and free for dynamic memory allocation, especially
when dealing with variable-sized data structures.
12.User Input Validation:
•Validate user inputs to ensure they are within acceptable ranges and formats.
AIM
The movie ticket booking system aims to enhance the efficiency, convenience, and security
of the movie ticket reservation process for both users and administrators while providing a
valuable learning experience for C programming enthusiasts.
Advantages: -

• Quick Booking Process: Online booking reduces the time spent in queues
at physical ticket counters, enabling users to complete the process efficiently.

• Instant Confirmation: Users receive immediate confirmation of their


bookings, eliminating the need for manual validation.

Disadvantages: -

Data Security: Users may have concerns about the security of their personal and
financial information when making online transactions.

•Privacy Issues: Users may be apprehensive about providing personal details for
account registration, especially if they are concerned about how the data will be used.

•Movie theaters may rely on third-party booking platforms, and any issues with these
platforms

Future Enhancements: -
1.the language is great for system level programming

2.its close to the operating system making it easier to access system resources like
memory.

3.a quick job search shows a diversity of job openings in c program .


SYSTEM REQUIREMENTS

 SOFTWARE REQUIREMENTS:
The major software requirements of the project are as follows:
Language : C PROGRAM
Operating System: Windows Xp or later.

 HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as follows:

RAM :2GB RAM

Processor: A multi-core processor with sufficient processing power to


handle concurrent user requests.

FLOW CHART
ALGORITHM
1. Display Movie Information:
•Retrieve the list of available movies and their showtimes.
•Display movies with details (title, genre, rating, showtimes).
2. User Input:
•Prompt the user to select a movie and preferred showtime.
•Validate the user's input and ensure the selected showtime is
available.
3. Seat Selection:
•Display a seating layout for the selected showtime.
•Highlight available seats and allow the user to select desired seats.
•Update the seat availability status accordingly.
4. Booking Confirmation:
•Calculate the total price based on the number of selected seats and their
prices.
Confirm the booking details (movie, showtime, seats, total price).
•Prompt the user for confirmation.
5. Payment Processing:
•If the user confirms, proceed to payment processing.
•Implement a secure payment gateway to handle transactions.
•Verify the payment status and update the booking record accordingly.
6. Booking Record:
•Store booking details in a database or file system.
•Update the seat availability status after successful booking.
7. Confirmation and Ticket Generation:
•Generate a booking confirmation/ticket with unique identification.
•Display/print the ticket with relevant details (booking ID, movie, showtime,
seats, etc.).
•Provide an option to email or download the ticket.

IMPLEMENTATION
#include <stdio.h>

#include <string.h>

#include <time.h>

struct Ticket {

char name[50];

char contactNo[15];

};

struct Card {

struct Ticket ticket;

char address[100];

char emailId[50];

};

void pay(int);

void cardRegistration();

void displayTime();

int main() {

int choice;

char ans;

do {

displayTime();

printf("\n\t\t\t ----------------------------------");
printf("\n\t\t\t Simple Movie Ticket Booking System");

printf("\n\t\t\t ----------------------------------");

printf("\n\t\t\t\t Welcome Customer!");

printf("\n\n\t\t\t\t <1> Movie Timings");

printf("\n\t\t\t\t <2> Receiving Ticket");

printf("\n\t\t\t\t <3> For Information");

printf("\n\t\t\t\t <4> DTCard Registration");

printf("\n\t\t\t\t <5> Exit \n\n");

printf("\t\t\t\tEnter Your Choice : ");

scanf("%d", &choice);

switch (choice) {

case 1:

// Movie Timings

// ... (same as your code)

break;

case 2:

// Receiving Ticket

// ... (same as your code)

break;

case 3:

// For Information

// ... (same as your code)

break;
case 4:

// DTCard Registration

cardRegistration();

break;

case 5:

// Exit

printf("\n\t\t\t\tBrought To You by code-projects.org\n\n\t\t\t\t");

getchar(); // Consume the newline character left by scanf

getchar(); // Wait for user input before exiting

return 0;

default:

printf("\n\t\t\t\tInvalid Choice. Please try again.");

printf("\n\t\t\t\tDo you want to choose another option (y/n): ");

scanf(" %c", &ans);

} while (ans == 'y' || ans == 'Y');

return 0;

void displayTime() {

time_t t = time(NULL);

struct tm* timePtr = localtime(&t);


printf("\nTime of the computer presently:");

printf("\nseconds= %d", timePtr->tm_sec);

printf("\nminutes = %d", timePtr->tm_min);

printf("\nhours = %d", timePtr->tm_hour);

printf("\nday of month = %d", timePtr->tm_mday);

printf("\nmonth of year = %d", timePtr->tm_mon);

printf("\nyear = %d", timePtr->tm_year + 1900);

printf("\nweekday = %d", timePtr->tm_wday);

printf("\nday of year = %d", timePtr->tm_yday);

printf("\ndaylight savings = %d", timePtr->tm_isdst);

void cardRegistration() {

struct Card card;

int cardId;

printf("\n\t\t\t\tWelcome to register for card facility in our cinemas");

printf("\n\t\t\t\tEnter your name: ");

scanf("%s", card.ticket.name);

printf("\t\t\t\tEnter your mobile number: ");

scanf("%s", card.ticket.contactNo);

printf("\t\t\t\tEnter the address: ");

getchar(); // Consume the newline character left by previous scanf

fgets(card.address, sizeof(card.address), stdin);

card.address[strcspn(card.address, "\n")] = '\0'; // Remove trailing newline

printf("\t\t\t\tEnter the mail id: ");


fgets(card.emailId, sizeof(card.emailId), stdin);

card.emailId[strcspn(card.emailId, "\n")] = '\0'; // Remove trailing newline

srand(time(NULL));

cardId = rand() % 400000 + 4000000;

if (cardId < 0)

cardId = -cardId;

printf("\t\t\t\tYour new card number is - : %d", cardId);

FILE* fout = fopen("card.dat", "a");

if (fout == NULL) {

printf("\t\t\t\tError opening file for writing.\n");

return;

fprintf(fout, "\nName: %s\nMobile No.: %s\nAddress: %s\nMail ID: %s\nCard Number:


%d",

card.ticket.name, card.ticket.contactNo, card.address, card.emailId, cardId);

fclose(fout);

printf("\n\t\t\t\tThank you for the registration for the card.\n");

INTEGRATION AND SYSTEM TESTING


OUTPUTS
Screen Shots:
CONCLUSION
A movie ticket booking system, whether implemented online or through other means,
provides significant advantages for both customers and businesses. The transition from
traditional ticket purchasing methods to online platforms has streamlined the entire movie-
going experience, offering convenience, accessibility, and enhanced functionality. The
implementation of a movie ticket booking system, especially online, not only simplifies the
booking process for customers but also offers numerous benefits for businesses, contributing
to a more seamless and enjoyable movie-going experience for all stakeholders. Continuous
improvement, security measures, and responsiveness to user feedback are key elements in
maintaining the effectiveness and success of such systems.

You might also like