Hello and welcome all to my LLD Case Study Series. Here I would try to express my learning’s of Object Oriented Design and Analysis which is perhaps also known as Low Level Design. It is a very important topic when you would be sitting for any Product Based Companies now or in future. So without further delay, let’s start.
Introduction:-
We are going to design the complete Movie ticket booking system using Object Oriented Analysis and Design (OOAD). First of all we would follow a series of steps in order to complete design the system from scratch. Those steps are discussed below.
Requirement Gathering:-
So we would list some basic things that a movie ticket booking (or any ticket booking system) generally have. Those are:-
So these were some basic requirements that the system would contain. In the interview you can also ask to the interviewer that would the system contain other functionalities like Multi-Screens, Selection of Seats, Payment gateway, Multi-Lingual movies. These can be the future prospects one can consider. OK, now we can have the following assumptions.
This was some requirements and assumptions that we made. Next on we would move onto create the use-case diagrams for our systems.
USE CASE DIAGRAMS:-
(Please refer to my blog link at the end if you want to consult the diagram).
Ok now we are clear and ready with the requirements of the system, we can now move towards drawing the use-case diagram. So use-case diagram basically identifies the relationship between actors and the system. Through use-case diagrams we can get a much more clear insight on how the whole system would work. There are certain steps to make use-case diagrams. Those are:-
From the requirement analysis phase we have identified that we have two main or primary actors. Those are User and Theatre. So here is the basic use case diagram of our system.
This is the use-case diagram of our online Movie Ticket Booking System. I have considered BookMyShow as the system and user and theatre as the primary actors. Then we are denoting the use cases in our system. Register, login, Search movie, Book Ticket, Add Show, Update Show are the use cases shown in ovals. The straight lines from actors to use cases are known as Association (relations between the both). Then from Book a ticket we can identify an inclusive use-case known as Select Show(Payments can be another use case but we are not considering payment gateway here). Next step would be creating the Class Diagram of this system which would help us in better understanding and help in coding the system.
CLASS DIAGRAM:-
Below is the class diagram of the Online Movie Ticket Booking System.
(Please refer to my blog link for the diagram).
So in this class diagram we have all classes that we have identified.
CODING THE SYSTEM:-
For the code of the entire system in Object Oriented Manner you can go and check out my Github Repo where the code of this system is uploaded. Here is the link.
Github Repo:- https://github.com/Rajdp07/MovieTicketBookingSystem-LLD-OOAD
CONCLUSION:-
Coming to the very end of the interview you can be asked questions like:-
Do some research about this questions and try to find out those answers. Until then stay tune to this series that I started to learn about more Low Level Design Interview Problems. If you want a graphical representation of the class diagrams then head over to this link of mine https://codeglimpse.blogspot.com/2021/01/case-study-1-low-level-design-of-online.html . Thanks again and see you soon.