Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

* Solve the solution with details. A new company, QCTickets, provides software f

ID: 3843334 • Letter: #

Question

* Solve the solution with details.

A new company, QCTickets, provides software for applications to ticketing of sports events. Advise QCtickets on the best data structures to employ in the following tasks. Give brief explanations of your advice in each case.

(a) Ticket orders are to be taken by phone. Incoming calls are put on hold until an operator is available and are then answered. What data structure should store the incoming calls?

(b) After a ticket is ordered by phone, a request is sent to a mailing department. The mailing department prints and mails some tickets once every weekday. They start with the most expensive waiting order. What data structure should store the requests to the mailing department?

(c) When a person uses a ticket, their ticket number must be compared quickly against the numbers of all tickets that have already been used. (To prevent people from using photocopied tickets.) How should the numbers of tickets that have been used be stored?

(d) In order to arrange car pooling opportunities, interested people are to be notified of other customers who live in nearby zip codes. How should a list of customers and their addresses be stored?

Explanation / Answer

In present scenario bookings for fun & entertainment are carried out by first come first serve policy, which can be done using the data structure called "Queues". It is described as "first in, first out".

In this case, booking tickets for a sports event are done by providing the better opportunity for the audience to choose according to their requirement.

(a) Ticket orders are to be taken by phone. Incoming calls are put on hold until an operator is available and are then answered. What data structure should store the incoming calls?

For above criteria, double Linked List is the better option because double linked list consists of two blocks for saving the data. one for head and other for storing the address of the next node.

  NODE 1

when a phone call is taken for booking that particular data will be stored in the head of the node 1, and if another call is attempted for booking tickets it will be taking the second node and that node address would be carried to address part of the 1st node, in this way the data would not be lost. In case they are n number of customers then it will take n number of nodes.

b) After a ticket is ordered by phone, a request is sent to a mailing department. The mailing department prints and mails some tickets once every weekday. They start with the most expensive waiting order. What data structure should store the requests to the mailing department?

Priority Queue is the best option here for the mailing department to use for saving the data of the customer. A person with a higher priority would be given high priority. Likewise, the most expensive waiting order can be taken first.

c) When a person uses a ticket, their ticket number must be compared quickly against the numbers of all tickets that have already been used. (To prevent people from using photocopied tickets.) How should the numbers of tickets that have been used be stored?

“compare” means that given any input phrase, you can identify whether it is in list A only, list B only, lists A and B, or neither list.

For this, you will simply need any data structure implementing a Map interface (Hashtable being most popular)

Start with a pointer to position zero of both lists. (pA, pB). Let pA be the list which has entered into the stadium & pB be the list in which newcomers are added. Then repeat following steps until you reach an end of both lists.

By applying the above structure we can filter out the duplicate values and repeated values.

(d) In order to arrange carpooling opportunities, interested people are to be notified of other customers who live in nearby zip codes. How should a list of customers and their address be stored?

For creating these types of applications we need to look after some entities as follows

Trees are the better-opted option for carrying out these requests because trees follow multilayer data structure.

and these types of applications work on multi-layer where one layer is interrelated to another.

head address