Photo AI

A staff member may request a schedule of his/her duties - NSC Information Technology - Question 3 - 2018 - Paper 1

Question icon

Question 3

A-staff-member-may-request-a-schedule-of-his/her-duties-NSC Information Technology-Question 3-2018-Paper 1.png

A staff member may request a schedule of his/her duties. When a name is selected from the combo box cmbStaff, the following information must be displayed in the out... show full transcript

Worked Solution & Example Answer:A staff member may request a schedule of his/her duties - NSC Information Technology - Question 3 - 2018 - Paper 1

Step 1

Combo box [3.1 - Select name]

96%

114 rated

Answer

To extract the staff member's name selected from the combo box (cmbStaff):

  1. Retrieve the selected name from cmbStaff.
  2. Display the name as a heading consisting of the selected staff member's name.
  3. Loop through rows from 1 to MaxRow.
  4. For each row, loop through columns from 1 to MaxCol.
  5. Check if the corresponding entry in arrPlacements matches the selected name.
  6. If it matches, display the schedule detail in the output area with the format:
    • 'Day ' + day number + ': Library' + library number.

Step 2

Button [3.2 - Create new schedule]

99%

104 rated

Answer

To create a new schedule when the button is clicked:

  1. Prompt the manager to input a day number (1 to 6) on which Library 3 will be closed.
  2. Loop through rows from 1 to MaxRow for scheduling the staff:
    • For each library, differentiate the placement:
    • For Library 1: Assign each staff member in order from arrStaff to days 1 to 6.
    • For Library 2: Assign each staff member in reverse order to days 6 to 1.
    • For Library 3: For the designated closed day, set arrPlacements to 'XXXXX'.
  3. Ensure the random allocation of staff members does not duplicate for the same day in Libraries 1 and 2.

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

;