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

3.1 - Display queues

96%

114 rated

Answer

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

  1. Determine Number of Counters: Using conditional statements, check the number of elements in the arrPassengers array:

    • If there are 1 to 9 passengers, set counters to 1.
    • If there are 10 to 16 passengers, set counters to 2.
    • If there are 17 to 24 passengers, set counters to 3.
    • For more than 24 passengers, set counters to 4.
  2. Determine Number of Rows: Calculate the number of rows needed, which is determined by dividing the number of passengers by the number of counters. Round up if necessary.

  3. Sort Passengers: Implement a sorting algorithm to arrange passengers in the array according to their flight information. This would involve:

    • Using an outer loop to iterate through each passenger.
    • Applying an inner loop to compare and swap elements to achieve the correct order.
  4. Copy Passengers' Information to 2D Array/Grid: Create a 2D array to represent the queues. Use nested loops to populate it:

    • First loop through rows to determine the passenger's queue.
    • Use a counter to manage the number of passengers assigned to each queue based on their arrival order.
    • Ensure the correct indexing to copy data from the 1D passenger array to the 2D queue representation.
  5. Display Passengers in Queues: Implement a display function that prints out the headings and passenger details:

    • Loop through each row and column of the 2D array to present each passenger’s information clearly.
    • Ensure to include the total counts of passengers in each queue.

Step 2

3.2 - Create new list

99%

104 rated

Answer

To manage passengers from a delayed flight:

  1. Read Flight Number: Capture the delayed flight number using a combo box and display it.

  2. Loop Through Array: Iterate through the arrPassengers array:

    • Check if the flightNumber matches the delayed flight number.
    • If it matches, increment a counter (newPassengers) to keep track of all passengers from the delayed flight.
  3. Remove Passengers from Rows: Adjust the original passenger list:

    • Subtract the newPassengers from the total number of passengers.
    • Create a temporary array to store remaining passengers post-removal.
    • Loop through the original arrPassengers array to populate this new array, excluding passengers from the delayed flight.
  4. Update Counts and Display Output: Update necessary counters and display the new list of passengers effectively, ensuring clarity in how many total passengers are now assigned separate counters.

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

;