November 2002 Paper 2
November 2002 Paper 2
November 2002 Paper 2
INSTRUCTIONS TO CANDIDATES
Write your name, Centre number and candidate number on your work.
1 An employment agency’s business is to match job vacancies with people who are looking
for work. You have been asked to design a system to handle the matching of the
requirements of the employers and the job seekers.
The system will require the operator to input the following two sets of information.
(a) Using appropriate software, design a method of storing both sets of data. [4]
(c) The operator needs to be able to use a query screen to input a person’s name to find
out what jobs of the relevant job type are available. Set up a user-friendly system, with
sufficient test data, in order to do this.
Devise and implement a method to input the person’s name, which will result in the
system producing the details of the relevant jobs. [5]
(d) Produce a short user guide so that an operator can use this system. [10]
9691/02/Nov 2002
3
read m
for a = 1 to m
read x (a)
next a
read n
for b = 1 to n
read y (b)
next b
s=t=d=1
while s ≤ m and t ≤ n
if x (s) < y (t)
z (d) = x (s)
s=s+1
d=d+1
endif
else
if x (s) > y (t)
z (d) = y (t)
t=t+1
d=d+1
endif
else
z (d) = x (s)
s=s+1
d=d+1
endwhile
while m ≥ s
z (d) = x (s)
d=d+1
s=s+1
endwhile
while n ≥ t
z (d) = y (t)
d=d+1
t=t+1
endwhile
(a) Implement this algorithm. Write down the final contents of arrays x, y and z when the
algorithm is executed with the following test data.
(i) 3, 1, 4, 9, 3, 2, 3, 7
(ii) 4, 2, 4, 6, 7, 3, 3, 5, 9
[6]
(b) The test data does not test all branches of the algorithm.
(i) Write down the part of the algorithm not yet tested.
(ii) Write a set of test data which will test this branch.
(iii) Using your set of test data, write down the final contents of array z.
[4]
3 An examination consists of two papers, each marked out of 100. Each candidate has a
four-digit candidate number.
A computer will process and grade the examination results for candidates taking the
examination, using the following conditions.
● Each candidate’s number and marks for the two papers will be input and then
processed.
● The list of candidate’s numbers and marks will be ended with the rogue data 9999, 0, 0
● The candidate’s number and DISTINCTION, MERIT, PASS or FAIL grade will be
printed as appropriate.
● Following the printout of individual results, the total number of candidates who took the
examination will be printed along with the total number of DISTINCTION, MERIT,
PASS and FAIL grades awarded.
(a) Draw a Jackson diagram to show how the problem may be broken down. [9]
(b) Write an algorithm that will allow all the candidates’ marks to be processed. [14]