Ajay Reddy
Ajay Reddy
(Deemed to be University)
On
SUBMITTED BY:
2300030352 K. Hansika
Mr. G. VENKATESH
Asst professor,CSE.
KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES-1
CERTIFICATE
Mr.G.VENKATESH Dr.D.Haritha
ACKNOWLEDGEMENTS
Project Associates
K. Hansika
M. V. K. Bhagya Sri
P. Goutham Varma
ABSTRACT
1 Introduction 1
4 Flow Chart 4
5 Algorithm 5
6 Implementation 6
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.
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.
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:
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 {
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 ----------------------------------");
scanf("%d", &choice);
switch (choice) {
case 1:
// Movie Timings
break;
case 2:
// Receiving Ticket
break;
case 3:
// For Information
break;
case 4:
// DTCard Registration
cardRegistration();
break;
case 5:
// Exit
return 0;
default:
return 0;
void displayTime() {
time_t t = time(NULL);
void cardRegistration() {
int cardId;
scanf("%s", card.ticket.name);
scanf("%s", card.ticket.contactNo);
srand(time(NULL));
if (cardId < 0)
cardId = -cardId;
if (fout == NULL) {
return;
fclose(fout);