Movie Ticket Booking implementation using Doubly Circular Linked List (DCLL) by Mr. Rushikesh Phalke9/1/2016 This program is a implementation of Ticket Booking System using Doubly Circular Linked List. Data structures used in the program- Doubly Circular Linked List. Why Dcll? We know that in theatres more than 200 seats are there, Now if our head pointer points to the seat number ‘A1’ & user want to perform some operation with seat number ‘J1’ then it will be very much time consuming task ,as we need to traverse whole linked list from A1 to J7. Now when we use Doubly circular Linked List all seats are connected in a ring fashion so we can directly move from seat A1 to J7 using previous pointer as in previous pointer of head node address of seat J7 is stored. So lots of time gets saved which increases efficiency of the system. FUNCTIONS USED : - 1] create() :- To create 70 nodes internally ( in memory ), each node represent one seat. Each node has 6 parameters 1) previous pointer of node* type to store address of previous node; 2) next pointer of node* type to store address of next node; 3) seat_no- to store seat number (int type) 4) row_no- to store row no(char type) 5)booking status- to show wether seat is alredy booked or available for booking(char type) 6)pin- different pin for each seat(int type) So this function will create 70 nodes in memory locations & it will assign each node a seat_no,booking_status and pin. 2] display() :- To display the seating arrangement ie to display the linked list. The display will show row number followe by seat no followe by booking status (‘a’ or ‘b’ -> available/booked) of each seat/node. “In display additional lines of codes are added to make display more powerful for LINUX TERMINAL” 3] book_seat() :- it will take input from user as seat no. If booking status of that seat is ‘a’ then avaibility status of that seat will change from (a) to (b) . else it will show an error message. If Seat is booked succesfully the it will display pin for each seat. 4] cancle_seat() :- the purpose of assigning pin to each seat is only one who has booked the seat can cancel it. So at the time of cancelation pins are required . Now at cancelation time it wil ask for seat number and pin if seat number and pin combination matches and the avaibility status of that seat is booked then that seat will be cancled. Else it will give an error message. “RUN THIS CODE IN LINUX TERMINAL FOR BETTER OUTPUT EXPIRENCE”
6 Comments
Tejas jc
9/1/2016 12:04:10 am
Code is excellently written..and really worth appreciate.
Reply
Sapana jain
9/1/2016 04:41:01 pm
i executed your program
Reply
rushikesh phalke
9/1/2016 04:48:17 pm
if you will see the create function.
Reply
Sanya
2/23/2018 12:42:12 am
Soo much of errors ....can u check nd correct it
Reply
name
10/22/2020 03:23:03 pm
how will you show in this program doubly circular linked list is used
Reply
6/24/2022 04:04:19 pm
Helllo ketandesale, I read your blog and Found it interesting and got a great knowledge about Ticket Booking Companies and their Travel system and i also have had a great interaction with one of the similar kinds of <a href="https://paydeer.in/services/ticket-booking">Ticket Booking Companies In Rajasthan</a> and how they have been a satisfied ticket booking website for people across India as They have also entertained me with their best facilities and discounts on my first booking and hence had a great user experience out there, I would definitely like to suggest you to check it out if you want to enjoy and grab many kinds of offers and discounts on your first ticket booking.
Reply
Leave a Reply. |
AuthorProf. Ketan Sanjay Desale Archives
April 2020
Categories |