Toggle navigation
Home
Ask A Question
Answer Questions
Users
Support/FAQ
Login
Register
Preview 50% of the Answer Below
Due to formatting, images, tables, or paragraphs may be out of place or not shown. Rest assured that they will be included and formatted correctly in your purchased answer.
Details
Question Title:
Computer sicence
Go Back to the Question
Answer Preview
Attachment #1 Preview
XXXXXXXXX.XXXXXXX(); head = XXXX->next; XX (XXXX != NULL) { XXXX->prev = NULL; } XXXXXX XXXX; } return ""; } // XXXXXX the XXXX of list int XXXXXXX() { Node *XXXX = XXXX; int res = 0; while (node != XXXX) { res++; XXXX = XXXX->XXXX; } return XXX; } // XXXXX if list is empty XXXX XXXXXXX() { XXXX *node = XXXX; XXXXXX (XXXX == NULL); } XXX XXXX() { // Example XXX XXXXXX; XX{ XXXX << "1- XXX a passenger to XXX XXXXXXX list" << endl << "2- Display XXX XXXXXXXXX with highest XXXXXXXX" << XXXX << "3- Remove XXXXXXXXX with XXXXXXX XXXXXXXX" << endl << "X- XXXXXXX the XXXXXX XX XXXXXXXXXX on XXX XXXXXXX list" << endl << "X- XXXX" << endl; cout << "Enter choice: "; XXX >> XXXXXX; XXXXXX(choice) { case X: { XXXXXX XXXX; int number_of_flights; cout << "XXXXX XXXX: "; XXX >> XXXX; XXXX << "XXXXX XXXXXX XX XXXXXXX: "; cin >> XXXXXXXXXXXXXXXXX; XXXXXXX(Passenger(name,XXXXXXXXXXXXXXXXX,time(NULL))); cout << "XXXXX to XXX waiting XXXX." << endl; } XXXXX; case 2: { XXXX<< "XXXXXXXXX XXXX XXXXXXX XXXXXXXX XX: " << XXXXX() << endl; } XXXXX; case 3: { cout << "XXXXXXXXX XXXX XXXXXX priority " << XXXXXXX() << " XX removed." << endl; } XXXXX; case X: { XXXX << "XXXX of waiting list: " << XXXXXXX() << XXXX; } break; case X: { cout << "Exiting..........."; } } cout << endl; } XXXXX(XXXXXX != 5); XXXXXX 0; } XXXXXX Output:- X- XXX a passenger XX the waiting XXXX 2- Display XXX XXXXXXXXX with XXXXXXX XXXXXXXX X- XXXXXX XXXXXXXXX with highest XXXXXXXX 4- Display XXX XXXXXX of passengers on the waiting XXXX X- Exit XXXXX choice: X Enter name: XXXXX Enter number XX XXXXXXX: 10 XXXXX to the XXXXXXX list. X- XXX a passenger XX XXX waiting XXXX X- Display XXX XXXXXXXXX XXXX highest priority 3- Remove passenger XXXX XXXXXXX priority 4- XXXXXXX the XXXXXX of XXXXXXXXXX XX XXX XXXXXXX list 5- Exit Enter choice: X XXXXX XXXX: XXXXX Enter XXXXXX XX flights: X XXXXX XX XXX waiting XXXX. X- Add a passenger XX XXX XXXXXXX XXXX 2- XXXXXXX the passenger with highest priority 3- Remove passenger with highest priority 4- Display the XXXXXX of passengers XX XXX XXXXXXX XXXX X- XXXX Enter choice: X Enter XXXX: finch XXXXX number of flights: 10 Added to the waiting list. 1- XXX a passenger to the waiting list 2- XXXXXXX XXX XXXXXXXXX with XXXXXXX priority 3- Remove XXXXXXXXX with XXXXXXX priority 4- XXXXXXX XXX XXXXXX XX XXXXXXXXXX on XXX XXXXXXX list 5- Exit Enter choice: 2 Passenger XXXX XXXXXXX XXXXXXXX XX: smith 1- Add a passenger to the waiting XXXX X- XXXXXXX the XXXXXXXXX XXXX highest priority 3- XXXXXX XXXXXXXXX XXXX highest XXXXXXXX X- Display XXX number XX passengers on the waiting XXXX 5- Exit XXXXX choice: X Size of XXXXXXX XXXX: X X- XXX a XXXXXXXXX to the waiting XXXX 2- XXXXXXX the XXXXXXXXX with XXXXXXX priority X- Remove XXXXXXXXX with highest XXXXXXXX 4- Display the XXXXXX XX XXXXXXXXXX XX the XXXXXXX list X- XXXX Enter choice: X Passenger XXXX XXXXXX priority XXXXX is removed. X- XXX a passenger XX the XXXXXXX list 2- XXXXXXX the passenger with highest XXXXXXXX X- XXXXXX XXXXXXXXX XXXX highest priority X- XXXXXXX the number XX passengers on the XXXXXXX XXXX 5- XXXX Enter choice: 2 Passenger XXXX highest XXXXXXXX is: finch 1- XXX a passenger XX the XXXXXXX XXXX 2- XXXXXXX XXX passenger XXXX XXXXXXX priority X- Remove XXXXXXXXX XXXX highest XXXXXXXX 4- XXXXXXX XXX XXXXXX XX passengers on XXX waiting list X- XXXX XXXXX XXXXXX: X Size XX waiting XXXX: 2 1- Add a passenger XX XXX waiting XXXX X- Display XXX XXXXXXXXX with XXXXXXX XXXXXXXX 3- XXXXXX passenger XXXX XXXXXXX priority 4- XXXXXXX the number of XXXXXXXXXX on the XXXXXXX XXXX 5- XXXX XXXXX choice: 5 XXXXXXX">