Photo AI

SCENARIO Information centres, referred to as 'terminals', have been set up at three different points along the routes in the park - NSC Information Technology - Question 3 - 2016 - Paper 1

Question icon

Question 3

SCENARIO--Information-centres,-referred-to-as-'terminals',-have-been-set-up-at-three-different-points-along-the-routes-in-the-park-NSC Information Technology-Question 3-2016-Paper 1.png

SCENARIO Information centres, referred to as 'terminals', have been set up at three different points along the routes in the park. The management requires a softwar... show full transcript

Worked Solution & Example Answer:SCENARIO Information centres, referred to as 'terminals', have been set up at three different points along the routes in the park - NSC Information Technology - Question 3 - 2016 - Paper 1

Step 1

Button [3.1 – Activity/Facility codes for all terminals and directions]

96%

114 rated

Answer

To display the content of the arrArtCodes two-dimensional array:

  1. Initialize the column headings for each direction (North, South, East, West).
  2. Implement an outer loop to go through each terminal.
  3. Within the outer loop, implement an inner loop to process the directions.
  4. For each terminal and direction, extract the activity/facility codes from arrArtCodes.
  5. Print the terminal number followed by its corresponding activity/facility codes in neat columns on a new line.

Step 2

Button [3.2 – Activities/Facilities from a selected terminal and direction]

99%

104 rated

Answer

To display activities and facilities:

  1. Retrieve the selected terminal number and direction from user input.
  2. Output the terminal number and direction.
  3. Access the two-dimensional array arrCodes using the selected terminal and direction to find the corresponding activity codes.
  4. Loop through the activity codes and retrieve the corresponding names from arrActivities.
  5. Display these activities/facilities in the output area.

Step 3

Button [3.3 – Access routes to selected activity/facility]

96%

101 rated

Answer

To access routes for the selected activity/facility:

  1. Extract the index of the selected activity/facility from the combo box input.
  2. Initialize a counter to track the number of access routes.
  3. Create an output heading for clarity.
  4. Use an outer loop to iterate through the terminals, and an inner loop to check each terminal's access routes.
  5. For routes that match, display the terminal number and direction, and increment the counter.
  6. Finally, display the total number of access routes found.

Step 4

Button [3.4 – Maintenance at selected activity/facility]

98%

120 rated

Answer

To manage maintenance activities:

  1. Extract the index of the selected activity/facility from the combo box.
  2. Iterate through the arrArtCodes two-dimensional array using nested loops to find where the selected activity/facility exists.
  3. Remove the corresponding code letter from arrArtCodes.
  4. Display a message box informing the user that maintenance is underway.
  5. Lastly, show the updated contents of the arrArtCodes array to reflect the changes.

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

;