Photo AI

The new airline company, Soaring Eagles, wants to optimise the check-in process of their passengers - NSC Information Technology - Question 3 - 2017 - Paper 1

Question icon

Question 3

The-new-airline-company,-Soaring-Eagles,-wants-to-optimise-the-check-in-process-of-their-passengers-NSC Information Technology-Question 3-2017-Paper 1.png

The new airline company, Soaring Eagles, wants to optimise the check-in process of their passengers. The number of counters that will be opened and manned by their s... show full transcript

Worked Solution & Example Answer:The new airline company, Soaring Eagles, wants to optimise the check-in process of their passengers - NSC Information Technology - Question 3 - 2017 - Paper 1

Step 1

Button – [3.1 - Display queues]

96%

114 rated

Answer

To determine the number of check-in counters based on the number of passengers in the arrPassengers array, follow these steps:

  1. Determine Number of Counters:

    • For 1 to 9 passengers: counter 1
    • For 10 to 16 passengers: counter 2
    • For 17 to 24 passengers: counter 3
    • For More than 24 passengers: counter 4
  2. Determine Number of Rows:

    • Calculate the number of rows as: extNumberofRows=Number of PassengersNumber of Counters ext{Number of Rows} = \lceil \frac{\text{Number of Passengers}}{\text{Number of Counters}} \rceil
  3. Sort Passengers in Array:

    • Implement an outer loop to iterate through the array of passengers and an inner loop for sorting. Ensure to swap elements correctly.
  4. Copy Passengers' Information to 2D/ Grid:

    • Initialize the counter to test the end of the array.
    • Use a loop through the rows (for) and columns (while), updating the grid with the correct indexes.
  5. Display Passengers in Queues:

    • Loop through the headings and the data, ensuring that the correct number of rows and columns are displayed for each passenger's class and number.

Step 2

Button – [3.2 – Create new list]

99%

104 rated

Answer

To handle the delayed flight:

  1. Read Flight Number:

    • Read the number of the delayed flight from the combo box and display the corresponding flight number.
  2. Loop Through Passenger Array:

    • Test if the flight number matches the delayed flight number.
    • Increment newPassengers on the delayed flight and display at the new counter.
  3. Remove Passengers from Delay Flight:

    • Decrement the number of passengers based on the initial number of passengers in the delayed flight and create a temporary array for the remaining passengers.
  4. Update Original Passenger Array:

    • Loop through the original passenger array and adjust passenger numbers as necessary. Display updated output.

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;