SPOTIFLYER
VISVESVARAYA TECHNOLOGICALUNIVERSITY
“Jnana Sangama”, Belagavi-590018, Karnataka
A Mini Project Report on
“MOVIE TICKETS BOOKING APP”
Submitted in partial fulfillment of the requirement for the award of degree of
Bachelor of Engineering
In
Computer Science and Engineering
Submitted by
ASHISH S (4NN20CS403)
HARSHITHA K K (4NN20CS409)
Under the Guidance of
Sri. Deepak S
Assistant Professor
Dept. of CSE
NIE Institute of Technology
Mysuru -570018 2021-22
SPOTIFLYER
NIE Institute of Technology
CERTIFICATE
This is to certify that the mini project work entitled “MOVIE TICKETS BOOKING APP” is carried out by
ASHISH S bearing USN: 4NN20CS403 and HARSHITHA K K bearing USN: 4NN20CS409
in the partial fulfillment for the Sixth semester of Bachelor of Engineering degree in Computer
Science and Engineering of the Visvesvaraya Technological University, Belagavi during the
academic year 2021-22. The project report has been approved as it satisfies the academic requirements
with respect to project work prescribed for the Bachelor of Engineering.
Signature of the guide Signature of the HOD
Dr. Usha M.S
Mr. Deepak Associate Professor & Head
Asst. Professor, Dept. of CSE
Dept. of CSE NIEIT, Mysuru
NIEIT, Mysuru
External Viva
Name of the examiners Signature with Date
1…………………….... 1……………………….
2…………………….... 2……………………….
SPOTIFLYER
ACKNOWLEDGEMENT
We sincerely owe our gratitude to all people who helped and guided us in completing this
project work.
We are thankful to Dr. ARCHANA N V , Principal, NIEIT, Mysore, for having supported
us in our academic endeavors.
We are thankful to Dr. USHA M S, Head of Department of Computer Science and
Engineering, NIEIT for providing us timely suggestion, encouragement and support to complete
this mini-project.
We would like to sincerely thank our project guide, Sri. Deepak S ,Asst. Professor in Dept. of
Computer & Science and Engineering for providing relevant information, valuable guidance and
encouragement to complete this mini-project.
We would also like to thank all our teaching and non-teaching staff members of the
Department. We are grateful to the college for keeping labs open whenever required and providing
us Systems and Required software.
We are always thankful to our Parents for their valuable support and guidance in every step.
Also thank all our friends for their support and guidance throughout the project.
We express our deepest gratitude and indebted thanks to NIEIT which has provided us an
opportunity in fulfilling our most cherished desire of reaching our goal.
Yours Sincerely,
ASHISH S 4NN20CS403
HARSHITHA 4NN20CS409
SPOTIFLYER
ABSTRACT
In the proposed project, user can book ticket using online movie ticket booking app. user enter into web
page by logging with user name and password. Then we select the Movie and later in which theatre movie
is running. Later choose show timings and enter no of tickets you want .finally it displays the details of the
procedure and print the form to show at respective ticket counter to get ticket. The main purpose of this
online ticket booking system is to provide an alternate and convenient way for a customer to buy cinema
tickets. It is an automatic system. After the data has been fed into the database, the staff does not need to do
anything with the order once it is received through the system.
SPOTIFLYER
TABLE OF CONTENTS
ACKNOWLEDGEMENT Page no:
ABSTRACT
TABLE OF CONTENTS
CHAPTER 1 INTRODUCTION 1
1 1.1 Introduction to Kotlin
1 1.2 Features of Kotlin
CHAPTER 2 SYSTEM REQUIREMENT SPECIFICATIONS 2
2 2.1 Hardware requirements
2 2.2 Software requirements
CHAPTER 3 ABOUT THE PROJECT 3
3 3.1 Project description
3 3.2 Create an movie tickets booking app
3.3 About Movie Tickets App
3.4 Features of our App
CHAPTER 4 SYSTEM DESIGN 6
4.1 Flowchart
CHAPTER 5 IMPLEMENTATION 10
CHAPTER 6 SNAPSHOTS 13
CHAPTER 7 CONCLUSION FUTURE ENHANCEMENT 14
REFERENCES 16
CHAPTER-01
INTRODUCTION
1.1 Introduction to Kotlin
JetBrains developed IntelliJ IDEA, which is the basis for Android Studio. In 2011, the company
introduced the Kotlin language. Kotlin is a statically-typed, modern programming language that runs on
a Java Virtual Machine (JVM) by compiling Kotlin code into Java byte-code. It can also be compiled to
JavaScript source code and to native executables. Kotlin is flexible. Kotlin is object-oriented language,
and a “better language” than Java, but still be fully interoperable with Java code. Though Kotlin was
production ready, the language wasn’t stable. When important changes in the language happened,
developers had to change their codebase. Five years later, Kotlin released 1.0. At Google I/O 2017,
Google announced that Android will support Kotlin as a first-class programming language from now on.
For this to happen, the 3.0 release of Android Studio (AS) integrated Kotlin support out of the box! The
following three minor releases of AS continued to improve the Kotlin support and the tools available.
Kotlin support for JavaScript (i.e., classic back-end) is considered stable in Kotlin 1.3 by its developers,
while Kotlin/JS (IR-based) in version 1.4, is considered alpha. Kotlin/Native Runtime (for e.g., Apple
support) is considered beta.
1.2 Features of Kotlin:
Statically typed
Data Classes
Concise and Safe
Interoperable with Java
Functional and Object-Oriented Capabilities
Less Compilation time
User-Friendly
--
--
CHAPTER-02
SYSTEM REQUIREMENT SPECIFICATIONS
Android Studio is the official integrated development environment (IDE) for Google's Android operating
system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It is
available for download on Windows, macOS and Linux based operating systems The first stable build was
released in December 2014. Android Studio provides many excellent features that enhance productivity
when building Android apps, such as a blended environment where one can develop for all Android
devices, apply Changes to push code and resource changes to the running app without restarting the app, a
flexible Gradle-based build system, a fast and feature-rich emulator, GitHub and Code template
integration to assist you to develop common app features and import sample code, extensive testing tools
and frameworks, C++ and NDK support, and many more.
HARDWARE REQUIREMENTS
Processor: AMD Ryzen 5 / Intel Core 9 th Gen i5 processor or higher processor
RAM: 8GB or more
ROM: 256GB SSD or more
Input: Keyboard and Mouse
Display: 1920 X 1080 resolution display or more
Memory: 4GB
SOFTWARE REQUIREMENTS
Operating System: Windows 11
Android Studio
Language : Kotlin
CHAPTER - 03
ABOUT THE PROJECT
3.1 Project description:
Implementation is the stage where all planned activities are put into action. Before the implementation of
a project, the implementors (spearheaded by the project committee or executive) should identify their
strength and weaknesses (internal forces), opportunities and threats (external forces).
Create an Movie Tickets Booking App :
Movie is a part of every person’s life. No matter what your mood is, you have a song to sustain that mood.
If you wish to play your desired songs on Android devices, you need a movie tickets. So, through this
article, we will try to build our movie tickets booking app using Android.
About Movie Tickets App: In The movie ticket app that we will develop in this article would allow
the users to play the songs present on the device. You can download songs on your device and then use
the movie ticket to book those movies. Let’s see the quite exciting features that you get along with this
app.
Features Of Movie Ticket App:
1. You can access all present movies on your device.
2. Book your movies on the go without even having an internet connection.
3. Book your movie ticket.
4. Signup ,Login, List of movies ,select ,Book tickets.
5. We can top up our amount to our wallets
CHAPTER 4
SYSTEM DESIGN
4.1 Flow chart
CHAPTER 5
IMPLEMENTATION:
KOTLIN CODE:
activity_checkout
package nun.hunhun.cinevie.ui.detail
import android.content.Intent
import android.os.Bundle
import android.widget.LinearLayout
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.bumptech.glide.Glide
import com.google.firebase.database.*
import kotlinx.android.synthetic.main.activity_choose_seat.*
import kotlinx.android.synthetic.main.activity_detail_film.*
import kotlinx.android.synthetic.main.activity_detail_film.view.*
import kotlinx.android.synthetic.main.fragment_dashboard.*
import nun.hunhun.cinevie.R
import nun.hunhun.cinevie.model.Cast
import nun.hunhun.cinevie.model.Film
import nun.hunhun.cinevie.ui.checkout.seat.ChooseSeatActivity
class FilmDetailActivity : AppCompatActivity() {
private lateinit var reference : DatabaseReference
private lateinit var data: Film
private var castList = ArrayList<Cast>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_detail_film)
data = intent.getParcelableExtra("data")!!
reference =
FirebaseDatabase.getInstance().getReference("Film").child(data.title.toString()).child("cast")
rv_cast.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
initView()
getDataCast()
}
private fun initView(){
val btnBack = findViewById<LinearLayout>(R.id.btn_back)
tv_title.text = data.title
tv_genre.text = data.genre t tv_desc.text = data.desc
Glide.with(this).load(data.poster).into(img_poster)
btn_buy.setOnClickListener { startActivity(Intent(this,
ChooseSeatActivity::class.java).putExtra("data", data)) }
btnBack.setOnClickListener { onBackPressed() }
}
private fun getDataCast(){
reference.addListenerForSingleValueEvent(object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
castList.clear()
for (castSnapshot in snapshot.children) {
val cast = castSnapshot.getValue(Cast::class.java)
if (cast != null) {
castList.add(cast)
}
rv_cast.adapter = CastAdapter(castList)
}
}
override fun onCancelled(error: DatabaseError) { Toast.makeText(this@FilmDetailActivity, "" +
error.message, Toast.LENGTH_LONG).show() }
})
}
}
FilmDetailActivity
package nun.hunhun.cinevie.ui.checkout.seat
import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.GridLayoutManager
import com.google.firebase.database.*
import kotlinx.android.synthetic.main.activity_choose_seat.*
import nun.hunhun.cinevie.R
import nun.hunhun.cinevie.model.Seat
import nun.hunhun.cinevie.model.Film
import nun.hunhun.cinevie.ui.checkout.CheckoutActivity
import nun.hunhun.cinevie.utils.GridItemDecoration
import java.util.*
import kotlin.collections.ArrayList
class ChooseSeatActivity : AppCompatActivity(), ChooseSeatAdapter.OnSelectedChangedListener {
private var row = 5
private var column = 5
private var sumSeat = 25
private var adapter: ChooseSeatAdapter = ChooseSeatAdapter()
private lateinit var data: Film
private lateinit var filmReference : DatabaseReference
private lateinit var seatReference : DatabaseReference
private var mSelects = ArrayList<Int>()
private val statusSeatList = ArrayList<Boolean>()
private val seatList = ArrayList<Seat>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_choose_seat)
data = intent.getParcelableExtra("data")!!
filmReference = FirebaseDatabase.getInstance().getReference("Film").child(data.title.toString())
seatReference = FirebaseDatabase.getInstance().getReference("Seat").child(data.title.toString())
getData()
initView()
}
private fun initView(){
btn_back.setOnClickListener { onBackPressed() }
btn_checkout.setOnClickListener { onCheckout() }
setLayoutManager()
}
private fun setLayoutManager() {
getSeatData(object : seatDataCallback {
override fun onCallback(value: ArrayList<Boolean>) {
adapter.setRowAndColumn(column, row)
adapter.setOnSelectedChangedListener(this@ChooseSeatActivity)
adapter.setData(value)
rv_seat.addItemDecoration(GridItemDecoration(36, column))
rv_seat.setAdapter(adapter)
rv_seat.layoutManager = GridLayoutManager(this@ChooseSeatActivity, column)
}
})
}
//get data film from database realtime firebase
private fun getData(){
filmReference.addListenerForSingleValueEvent(object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
val film = snapshot.getValue(Film::class.java)
tv_title_film.text = film?.title
}
override fun
onCancelled(error: DatabaseError) {
Toast.makeText(
this@ChooseSeatActivity,
"" + error.message,
Toast.LENGTH_LONG
).show()
}
})
}
private fun onCheckout(){
val statusSeat = ArrayList<Boolean>()
statusSeat.addAll(statusSeatList) //make duplicate arraylist from statusSeatList
for (seat in seatList){
statusSeat[seat.number!!] = true
}
data.statusSeat = statusSeat
//intent
val intent = Intent(this, CheckoutActivity::class.java)
intent.putExtra("data", data)
intent.putParcelableArrayListExtra("list", seatList) //put extra with arraylist
startActivity(intent)
}
//change color button checkout when user click atleast one seat
private fun stateCheckoutBtn(total: Int){
if (total > 0){
btn_checkout.isClickable = true
btn_checkout.isEnabled = true
btn_checkout.setTextColor(ContextCompat.getColor(this, R.color.white))
btn_checkout.setText("CHECKOUT ("+total+")")
btn_checkout.background = ContextCompat.getDrawable(this, R.drawable.shape_rounded_accent)
} else {
btn_checkout.isClickable = false
btn_checkout.isEnabled = false
btn_checkout.setTextColor(ContextCompat.getColor(this, R.color.darkerGrey))
btn_checkout.setText("CHECKOUT")
btn_checkout.background = ContextCompat.getDrawable(this,
R.drawable.shape_rounded_blue_grey)
}
}
override fun onSelectedChanged(selects: ArrayList<Int>) {
mSelects.clear()
seatList.clear()
mSelects.addAll(selects)
val ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
val NUM = "123456789"
for (select in
selects) { var text =
""
val seat = Seat()
val myRow = select / row
val myColumn = select % column
text = String.format("%s%c%c ", text, ABC.get(myRow), NUM.get(myColumn))
seat.number = select
seat.seat = text
seat.price = data.price
seatList.add(seat)
}
stateCheckoutBtn(selects.size)
}
private fun getSeatData(callback: seatDataCallback){
seatReference.child("status").addListenerForSingleValueEvent(object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
if (snapshot.exists()) {
val status =
snapshot.getValue(String::class.java) val strs =
status!!.split(", ")
strs.forEach { statusSeatList.add(it.toBoolean()) }
} else {
repeat(sumSeat) { statusSeatList.add(false) }
}
callback.onCallback(statusSeatList)
}
override fun onCancelled(error: DatabaseError) {}
})
}
interface seatDataCallback {
fun onCallback(value: ArrayList<Boolean>)
}
CHAPTER 6
SNAPSHOTS
CONCLUSION
This paper gives the idea of a mobile ticket application on android phones developed by Android The
platform independent language java is used for the implementation. Along with that SQLite and Cloud
Database are used as databases for user and ticket information respectively. PHP is also used as a
development framework. All these things taken together can change the total concept of buying tickets in
the coming days. This application can be modified according to any kind of transport system. But this is
defined exclusively for sub urban railways. This android application reduces the manual work of both
ticket bookers and ticket checkers. It is basically the transition from a manual to digital system for ticket
booking of as well as ticket checking of suburban railways. QR code used for user validation ensures
security of the system. Automatically available train time allows the user to book tickets according to his
convenience; this work is performed in this project by GPS. Thus the problem associated with local train
ticket booking as almost ceased.
FUTURE ENHANCEMENT
More features can be added like
Allow Customers to comment on movies.
Provide a list of upcoming movies.
SMS notification after successful seat reservation.
Encrypted webpage to ensure customer privacy and transaction security.
More user friendly interface also in small screen device
REFERENCES
Google Developer Training, "Android Developer Fundamentals Course – Concept Reference”,
Google Developer Training Team, 2017.
https://www.gitbook.com/book/google-developer-training/android-developer- fundamentals course-
concepts/details
https://nodejs.org/en/docs/guides/
https://www.github.com/
https://www.stackoverflow.com/
https://reactnative.dev/docs/getting-started/
https://www.freecodecamp.org/