Srinivas JAVA

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Report on Java Code

School of computer science and Engineering


Course code: CSE310

Topic: Movie Ticket Booking

Section: K21EH

Name Registration number Roll number


Shahid Raza 12018744 58
Amogh Varshney 12112480 21
Shrinivas Kumar 12114103 40

Submitted to: Dr.Chandani Bhasin Mam


Introduction:
The purpose of this report is to provide an overview of the Movie Ticket System, which is a Java-based
application designed to manage movie theaters and ticket bookings. The system is designed to make the
ticket booking process easy for customers while providing a comprehensive management system for
theater owners.

Features:
The Movie Ticket System has several features that make it an efficient and user-friendly application for
both customers and theater owners. Some of the key features are as follows:

Movie Information: The system maintains a database of movies along with their names, duration, and
other details.

Theater Management: The application provides a platform for theater owners to manage their theaters.
They can add and modify information about the theaters, including the number of seats, screen size, and
location.

Show Schedule: The system maintains a schedule of shows for each theater. Theater owners can add
shows to their schedules, specify the start and end time, and assign a movie to the show.

Ticket Booking: Customers can search for shows, view available seats, and book tickets through the
system. The system generates a ticket with the customer's details and seat information.

Payment Integration: The system supports payment integration with various payment gateways, allowing
customers to make payments online.

Reports and Analytics: The system provides reports and analytics for theater owners to track sales,
revenue, and occupancy rates.

Technical Architecture:
The Movie Ticket System is built on a three-tier architecture, consisting of a presentation tier, a business
logic tier, and a data storage tier.

Presentation Tier: The presentation tier provides the user interface for customers and theater owners. It
is built using Java Server Pages (JSP) and Java Servlets. The user interface allows customers to search for
movies, view show schedules, and book tickets. Theater owners can add and modify theater and show
information.

Business Logic Tier: The business logic tier contains the core business logic of the application. It is built
using Java classes and interfaces. This layer handles user requests, processes them, and interacts with the
data storage tier to retrieve and update data.

Data Storage Tier: The data storage tier is responsible for storing and retrieving data from a database.
The system uses MySQL as the database management system.
Conclusion:
The Movie Ticket System is a comprehensive and efficient application that provides an easy-to-use
platform for customers to book tickets and theater owners to manage their theaters. The three-tier
architecture provides scalability and flexibility, making it easy to add new features and functionalities to
the system. The system is built using industry-standard technologies, making it robust and reliable.
Source Code:
import java.util.Scanner;

public class MovieTicketSystem {

private static final double TICKET_PRICE = 10.00;

private String movieName;

private String theaterName;

private String showTime;

private int numberOfTickets;

private double totalCost;

public MovieTicketSystem(String movieName, String theaterName, String showTime, int


numberOfTickets) {

this.movieName = movieName;

this.theaterName = theaterName;

this.showTime = showTime;

this.numberOfTickets = numberOfTickets;

this.totalCost = numberOfTickets * TICKET_PRICE;

public void displayMovieDetails() {

System.out.println("\nMovie Details:");

System.out.println("Movie Name: " + movieName);

System.out.println("Theater Name: " + theaterName);

System.out.println("Show Time: " + showTime);


System.out.println("Number of Tickets: " + numberOfTickets);

System.out.printf("Total Cost: $%.2f\n", totalCost);

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

System.out.println("Welcome to the Movie Ticket System!");

System.out.print("Enter the movie name: ");

String movieName = input.nextLine();

System.out.print("Enter the theater name: ");

String theaterName = input.nextLine();

System.out.print("Enter the show time: ");

String showTime = input.nextLine();

System.out.print("Enter the number of tickets: ");

int numberOfTickets = input.nextInt();

MovieTicketSystem movieTicket = new MovieTicketSystem(movieName, theaterName,


showTime, numberOfTickets);

movieTicket.displayMovieDetails();

You might also like