Computer sicence

Question

solve it with c++.


You are to implement a priority queue for passengers’ waiting list in a flight
company. Each passenger has name (string), number of flights and reservation time.
The passenger with highest priority is the one with the maximum number of flights.
If two passengers happen to have the same number of flights then priority is given
to the passenger with earlier reservation time.
Implement the previous priority queue using a sorted doubly linked list.
In the main function, implement the following list:
1- Add a passenger to the waiting list
2- Display the passenger with highest priority
3- Remove passenger from the waiting list (the one with highest priority).
4- Display the number of passengers on the waiting list.
5- Exit.
Your program should keep on displaying the above list until the user inputs 5 (Exit).
Note that the functions you need to implement are:
enqueue, dequeue, empty, front, size.


Details
Attachments
Purchase An Answer Below

Have a similar question?