A staff member may request a schedule of his/her duties - NSC Information Technology - Question 3 - 2018 - Paper 1
Question 3
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To extract the staff member's name selected from the combo box (cmbStaff):
Retrieve the selected name from cmbStaff.
Display the name as a heading consisting of the selected staff member's name.
Loop through rows from 1 to MaxRow.
For each row, loop through columns from 1 to MaxCol.
Check if the corresponding entry in arrPlacements matches the selected name.
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To create a new schedule when the button is clicked:
Prompt the manager to input a day number (1 to 6) on which Library 3 will be closed.
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'.
Ensure the random allocation of staff members does not duplicate for the same day in Libraries 1 and 2.