K L UNIVERSITY
FRESHMAN ENGINEERING DEPARTMENT
A Project Based Lab Report
On
MOVIE TICKET BOOKING
SUBMITTED BY:
I.D NUMBER NAME
190031150 N. VYSHNAVI
190031168 N. P. REDDY TEJASWINI
190031183 N. GOUTHAM
190031199 N. BHARGAV SAI
UNDER THE ESTEEMED GUIDANCE OF
SYED. KARIMUNISA
ASSISTANT PROFESSOR
KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES
CERTIFICATE
This is to certify that the project based laboratory report entitled
“MOVIE TICKET BOOKING” submitted by N. Vyshnavi, N. P. Reddy Tejaswini,
N. Goutham and N. Bhargav Sai bearing ID No. 190031150, 190031168, 190031183
and 190031199 to the Department of Basic Engineering Sciences, KL University in
partial fulfilment of the requirements for the completion of a project in “Data
Structures” course in I B Tech II Semester, is a Bonafede record of the work carried
out by him/her under my supervision during the academic year 2019-20.
PROJECT SUPERVISOR HEAD OF THE DEPARTMENT
SYED KARIMUNISA 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 our Coordinator and HOD-BES 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 Syed Karimunisa for his
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.
ID NO NAME
190031150 N. Vyshnavi
190031168 N. P. Reddy Tejaswini
190031183 N. Goutham
190031199 N. Bhargav Sai
ABSTRACT
This software project is a traditional movie ticket booking system with some
added functionality. This system is built for fast data processing and bill generation
for theatre customers. The billing system consists of a SQL database and effective
front end designed in Asp.net. The billing database is a vast collection of Movie name,
price and other specific data.
A ticket when billed is searched from the database and its price is added to the
bill based upon the ticket quantity. The system also contains upcoming movies on
various dates. The Movie Ticket booking system is built to help theatres calculate and
display bills and serve the customer in a faster and efficient manner and decrease
manpower. This software project consists of an effective to help the employee in easy
bill calculation and providing an efficient customer service.
INDEX
S.NO TITLE PAGE NO
1 Introduction 1
2 Aim of the Project 2
2.1 Advantages & Disadvantages 3
2.2 Future Implementation 4
3 Software & Hardware Details 5
4 Class Diagram/algorithm 6
5 Implementation 9
6 Outputs/Screenshots 17
7 Conclusion 20
1. INTRODUCTION
C is a procedural programming language.it was initially developed by Dennis
ritche between 1969and 1973.it was mainly developed as a system programming
language to write operating system. the main features of C language include low level
access to memory, simple set of keywords, and clean style, these features make C
language suitable for system programming like operating, system or compiler
development.
Many later languages have borrowed syntax/features directly or indirectly from C
language. Like syntax of java, PHP, java script and many other languages is mainly
based on c language. C++ is nearly a superset of C language.
(there are few programs that may compile in c. but not in C++)
In these programs we use files, structures, loops.
1|Page
2. AIM OF THE PROJECT
The main purpose of online ticket booking system is to provide another way for
the customer to buy cinema ticket. It is an automatic system, where we will automate the
reservation of tickets and enquiries about availability of tickets. After inserting the data
to file, staff need not to worry about the orders received through the system and hence
reduces the manual work. One of the best features of the system is to refund the amount
on cancellation of tickets by customer.
The modules in this project are
❖ To provide an anytime anyplace service for the customer
❖ To provide refund
❖ To minimize the number of staff at the ticket box
❖ To promote the film on the internet
❖ To increase the profit
2|Page
2.1. ADAVANTAGES AND DISADVANTAGES
ADVANTAGES:
• The system reduces much of human efforts in booking ticket.
• Saves money and resources of organization and excludes of use of paper or
sheets in making bill.
• It provides easy ticket cancellation technology.
• Saves time.
• It provides accuracy and faultless in billing calculations.
• The system is designed having attractive interface and with detailed description.
• It is flexible and user-friendly.
• It also notifies customers through sending an electronic bill via email.
DISADVANTAGES:
• Requires large database.
• Cannot track the product information if ticket number is lost.
3|Page
2.2. FUTURE IMPLEMENTATION
Future Scope:
Some more functions or modules may be added to project. Users can book their
desired seat which developed using GUI. User can get message alert before 30
minutes to show.
4|Page
3. SOFTWARE AND HARDWARE DETAILS
The major software requirements of the project are as follows:
Language: Java
Operating system: Windows XP or later.
Software: Eclipse IDE (2019-12).
The hardware requirements that map towards the software are as follows:
RAM: 4GB
Processor: 64bit processor
5|Page
4. ALGORITHM
Step 1: Start
Step 2: Read name, showtime, showdate, selection
Step 3: Assign seats available=20, bookingid=1
Step 4: Display-
Step 4.1: print theatre reservation
Step 4.2: print menu
Step 4.3: print booking
Step 4.4: print cancel
Step 4.5: print seat
Step 4.6: print records
Step 4.7: print exit
Step 5: Read selection
Step 6: Booking
Step 6.1: for(i=0;i<4;i++)
Step 6.2: Read choice[i][j].seats
Step 6.3: if (choice[i][j].seats<=seats available)
Step 6.3.1: Read customer name
Step 6.3.2: bookinggid++
Step 6.4: if(seats available<0)
Step 6.5.1: print number of available seats
Step 7: Seats Avialable
Step 7.1: print number of seats available
Step 8.1: print thank you
Step 9: display menu
Step 9.1: display the above information
Step 10: Stop
6|Page
5. DATA FLOW DIAGRAM
Start
Display
1. Book Ticket
2. Cancel Your Ticket
3. Check Availability
4. Upcoming Movies
if True
Booking()
1
False
if True
Cancel()
2
False
if True
Availability()
3
False
True
if
Upcoming()
4
False
Stop
7|Page
6. CLASS DIAGRAM
One
MovieTicket
+ book () : void
~ tkt: int
~ min : int
~ max : int
~ amt : int
~ finalprice : int
+ cancel () : void
~ fine : double
+ Availability () : void
~ x : int
+ Upcoming () : void
~ m : String
+main[args : String] : void
~ action : int
~ moviechoice : int
~ not : int
~ cost : int
8|Page
7. IMPLEMENTATION
SOURCE CODE OF THE PROJECT
package ONE;
import java.util.Scanner;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.io.*;
public class MovieTicket
{
/*Theatre capacity: 240*/
/*Premium seats: 40*/
/*Luxury seats: 120*/
/*General seats: 80*/
public static void book(int price,int chice,int not,int show)
{
int tkt;
System.out.println("\n\n"+"==================================
=");
System.out.println(" *Ticket Invoice*"+"\n"+" IMAX ::
HYDERABAD");
System.out.println("===================================");
if(show ==1)
{
System.out.println("MORNING SHOW :: 11:00
AM");
}
if(show==2)
{
System.out.println("NOON SHOW :: 02:30 PM");
}
if(show==3)
{
System.out.println("FIRST SHOW :: 06:20 PM");
}
if(show==4)
{
System.out.println("SECOND SHOW :: 10:00 PM");
}
if(chice==1)
9|Page
{
System.out.println("SCR01 JAANU");
}
if(chice==2)
{
System.out.println("SCR02 SARILERU NEKEVVARU ");
}
if(chice==3)
{
System.out.println("SCR03 ALA VAIKUNTAPURAMLO
");
}
if(chice==4)
{
System.out.println("SCR04 MASTER ");
}
if(price==200)
{
int min=201,max=232;
int y = (int) ((Math.random()*((max-min)+1))+min);
System.out.println("Ticket Number: ");
for(int i=0;i<not;i++)
{
System.out.println(" PRM00"+(y+i));
}
System.out.println("Rate: Rs."+price+"/-");
}
if(price==120)
{
int min=81,max=192;
int y = (int) ((Math.random()*((max-min)+1))+min);
System.out.println("Ticket Number: ");
for(int i=0;i<not;i++)
{
System.out.println(" LUX00"+(y+i));
}
System.out.println("Rate: Rs."+price+"/-");
}
if(price==80)
{
int min=1,max=72;
int y = (int) ((Math.random()*((max-min)+1))+min);
10 | P a g e
System.out.println("Ticket Number: ");
for(int i=0;i<not;i++)
{
System.out.println(" GEN00"+(y+i));
}
System.out.println("Rate: Rs."+price+"/-");
}
int amt =price*18/100;
int finalprice = (price +amt)*not;
System.out.println("GST: Rs."+amt+"/-");
System.out.println("No of Tickets: 0"+not);
System.out.println("===================================");
System.out.println("Total cost: Rs. "+finalprice+"/- ");
System.out.println("===================================");
}
public static void cancel(char c)
{
if(c=='P')
{
double fine = (200-(200*0.45));
System.out.println("Ticket Successfully Cancelled! "+"Amount
Rs."+fine+"/- will be credited into your account within 48 hrs."+"\n"+"Thank you
- IMAX");
}
if(c=='L')
{
double fine = (120-(120*0.45));
System.out.println("Ticket Successfully Cancelled! "+"Amount
Rs."+fine+"/- will be credited into your account within 48 hrs."+"\n"+"Thank you
- IMAX");
}
if(c=='G')
{
double fine = (80-(80*0.4));
System.out.println("Ticket Successfully Cancelled! "+"Amount
11 | P a g e
Rs."+fine+"/- will be credited into your account within 48 hrs."+"\n"+"Thank you
- IMAX");
}
public static void Availability(double min, double max,int mvechice)
{
if(mvechice==1)
{
System.out.println("Seats Available: JAANU");
}
if(mvechice==2)
{
System.out.println("Seats Available: SARILERU
NEKEVVARU");
}
if(mvechice==3)
{
System.out.println("Seats Available: ALA
VAIKUNTAPURAMLO");
}
if(mvechice==4)
{
System.out.println("Seats Available: MASTER");
}
int x1= (int) ((Math.random()*((max-min)+1))+min);
int x2= (int) ((Math.random()*((max-min)+1))+min);
int x3= (int) ((Math.random()*((max-min)+1))+min);
int x4= (int) ((Math.random()*((max-min)+1))+min);
System.out.println("\n"+"Morning Show "+x1);
System.out.println("Noon Show "+x2);
System.out.println("First Show "+x3);
System.out.println("Second Show "+x4);
}
public static void Upcoming() throws InterruptedException
{
String m1="APR 2020 - V";
String m2="APR 2020 - UPPENA";
String m3="APR 2020 - ARANYA";
String m4="MAY 2020 - KRACK";
String m5="OCT 2020 - KGF:Chapter 2";
12 | P a g e
System.out.println(m1);
TimeUnit.SECONDS.sleep((1/2));
System.out.println(m2);
TimeUnit.SECONDS.sleep((1/2));
System.out.println(m3);
TimeUnit.SECONDS.sleep((1/2));
System.out.println(m4);
TimeUnit.SECONDS.sleep((1/2));
System.out.println(m5);
}
public static void main(String[]args)throws Exception
{
Scanner in = new Scanner(System.in);
System.out.println("Welcome to IMAX");
System.out.println("Select option:");
System.out.println("1. Book Ticket");
System.out.println("2. Cancel Your Ticket");
System.out.println("3. Check Availability");
System.out.println("4. Upcoming Movies");
while(true)
{
int action =in.nextInt();
if(action>4)
throw new Exception("Choose valid movie!");
if(action==1)
{
System.out.println("Choose Movie");
System.out.println("1. Jaanu");
System.out.println("2. Sarileru Nekevvaru");
System.out.println("3. Ala Vaikuntapuram lo");
System.out.println("4. Master");
int moviechoice = in.nextInt();
if(moviechoice<5)
{
System.out.println("Choose Show: ");
System.out.println("1. Morning Show 11:00
AM");
System.out.println("2. Noon Show 02:30
PM");
System.out.println("3. First Show 06:20
13 | P a g e
PM");
System.out.println("4. Second Show 10:00
PM");
int show =in.nextInt();
int min1=8,max1=40;
int y1 = (int) ((Math.random()*((max1-
min1)+1))+min1);
int min2=24,max2=110;
int y2 = (int) ((Math.random()*((max2-
min2)+1))+min2);
int min3=10,max3=75;
int y3 = (int) ((Math.random()*((max3-
min3)+1))+min3);
System.out.println("Select Price:");
System.out.println("1. INR 200*"+"[
"+y1+" seats available]");
System.out.println("2. INR 120*"+"[
"+y2+" seats available]");
System.out.println("3. INR 80*"+"[
"+y3+" seats available]");
System.out.println("(*Prices are Exclusive
GST)");
int cost=in.nextInt();
System.out.println("Enter number of tickets
(Maximum 8 tickets per user)");
int not =in.nextInt();
System.out.println("Processing...");
TimeUnit.SECONDS.sleep(3);
if(not<9)
{
if(cost==1)
{
int price =200;
book(price,moviechoice,not,show);
}
if(cost==2)
{
14 | P a g e
int price = 120;
book(price,moviechoice,not,show);
}
if(cost==3)
{
int price = 80;
book(price,moviechoice,not,show);
}
}
else
{
throw new Exception("Max 8 tickets
per user");
}
}
if(action==2)
{
System.out.println("Enter your booking ID");
String ID = in.next();
char c= ID.charAt(0);
if(c=='P'||c=='L'||c=='G')
{
System.out.println("Processing...");
TimeUnit.SECONDS.sleep(3);
cancel(c);
}
else
{
throw new Exception("Enter a VALID
TICKET NUMBER");
}
}
if(action==3)
{
System.out.println("Choose Movie");
System.out.println("1. Jaanu");
System.out.println("2. Sarileru Nekevvaru");
System.out.println("3. Ala Vaikuntapuram lo");
15 | P a g e
System.out.println("4. Master(Tamil)");
int mvechice = in.nextInt();
Availability(23,240,mvechice);
}
if(action==4)
{
Upcoming();
}
}
}
}
16 | P a g e
8. OUTPUTS/SCREENSHOTS
Booking Ticket:
17 | P a g e
Cancellation:
Availability:
18 | P a g e
Upcoming:
Ticket:
===================================
*Ticket Invoice*
IMAX :: HYDERABAD
===================================
SECOND SHOW :: 10:00 PM
SCR02 SARILERU NEKEVVARU
Ticket Number:
PRM00214
PRM00215
PRM00216
PRM00217
PRM00218
PRM00219
Rate: Rs.200/-
GST: Rs.36/-
No of Tickets: 06
===================================
Total cost: Rs. 1416/-
===================================
19 | P a g e
9. CONCLUSION
The project is successfully completed to the extent possible. The results of the
project are shown earlier. By the end of this project we learnt many keywords in java.
We learnt Data Structures concept in java. We are now able to design various types of
sorting techniques.
20 | P a g e