Assignment 5 - SQL & OOPS Ticket Booking System
Assignment 5 - SQL & OOPS Ticket Booking System
Instructions
• Submitting assignments should be a single file or through git hub link shared with trainer and
hexavarsity.
• Each assignment builds upon the previous one, and by the end, you will have a comprehensive
Banking System implemented in Java/C#/Python with a strong focus on SQL schema design, control
flow statements, loops, arrays, collections, and database interaction.
• Follow object-oriented principles throughout the Java programming assignments. Use classes and
objects to model real-world entities, encapsulate data and behaviour, and ensure code reusability.
• Throw user defined exception from method and handle in the main method.
• The following Directory structure is to be followed in the application.
o entity/model
▪ Create entity classes in this package. All entity class should not have any business
logic.
o dao
▪ Create Service Provider interface/abstract class to showcase functionalities.
▪ Create the implementation class for the above interface with db interaction.
o exception
▪ Create user defined exceptions in this package and handle exceptions whenever
needed.
o util
▪ Create a DBPropertyUtil class with a static function which takes property file name
as parameter and returns connection string.
▪ Create a DBConnUtil class which holds static method which takes connection string
as parameter file and returns connection object.
o main
▪ Create a class MainModule and demonstrate the functionalities in a menu driven
application.
You are tasked with creating a ticket booking system for a Event. The system should support booking tickets
for different types of events, such as movies, concerts, and plays. Each event has its own pricing strategy, and
the system should also track available seats and customer bookings.
Database Tables
1. Venu Table
• venue_id (Primary Key)
• venue_name,
• address
2. Event Table
• event_id (Primary Key)
• event_name,
• event_date DATE,
• event_time TIME,
Control structure
Task 1: Conditional Statements
In a BookingSystem, you have been given the task is to create a program to book tickets. if available
tickets more than noOfTicket to book then display the remaining tickets or ticket unavailable:
Task 3: Looping
From the above task book the tickets for repeatedly until user type "Exit"
Task 6: Abstraction
Requirements:
1. Event Abstraction:
• Create an abstract class Event that represents a generic event. It should include the
following attributes and methods as mentioned in TASK 1:
2. Concrete Event Classes:
• Create three concrete classes that inherit from Event abstract class and override abstract
methods in concrete class should declare the variables as mentioned in above Task 2:
• Movie.
• Concert.
• Sport.
3. BookingSystem Abstraction:
• Create an abstract class BookingSystem that represents the ticket booking system. It should
include the methods of TASK 2 TicketBookingSystem:
4. Concrete TicketBookingSystem Class: