You are on page 1of 11

CANDIDATE PLEASE NOTE!

PRINT your name on the line below and retum 0 10


this booklet with your answer sheet. Failure to TEST CODE 02215
do so may result in dlsqualilicatioo.

FORM TP 2020205 L=::============= MAY/JUNE2020


CARIBBEAN EXAMINATIONS COUNCIL
CARIBBEAN ADVANCED PROFICIENCY EXAMINATION®
COMPUTER SCIENCE
UNIT 2 - Paper 01
1 hour 30 minutes

( 09 JUNE 2020 (a.m,LJ


READ THE FOLLOWING INSTRUCTIONS CAREFULLY.

I. This test consists of 45 items. You will have I hour and 30 minutes to answer them.

2. ln addition to this test booklet, you should have an answer sheet.


3. Do not be concerned that the answer sheet provides spaces for more answers than there are items
in this test.
4. Each item in this test has four suggested answers lettered (A), (B), (C), (D). Read each item you
are about to answer and decide which choice is best.
5. On your answer sheet, find the number which corresponds to your item and shade the space having
the same letter as the answer you have chosen. Look at the sample item below.

Sample Item
How many selection lines does an 8 x 1 multiplexer have? Sample Answer

(A) 1
(B) 2
(C) 3
0
0 (D) 8
<t
The best answer to this item is "3", so (C) has been shaded.

6. If you want to change your answer, erase it completely before you fill in your new choice.

7. When you are told to begin, tum the page and work as quickly and as carefully as you can. If you
cannot answer an item, go on to the next one. You may return to that item later.

8. You may do any rough work in this booklet.

9. Figures are not necessarily drawn to scale.

10. The use of silent, non-programmable calculators is allowed.

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO.


Copyright © 2019 Caribbean Examinations Council
All rights reserved .
022150 I 0/MJ/CAPE 2020
-2-

Item 2 refers to the following di


Item 1 refers to the following arrays. . h h . agrams
...........- w h 1c s ow two items stored in a q ueue.
0 1 2 0 I 2
Initial State
123 I891 6 ] 123 1 so 1 89 1 FRONT REAR
t Array l t Array2
t t
H J ]
If Array 1 is implemented as a stack, and
1.
the top of the stack is indicated by the
arrow, which of the following sequences
i
of operations results in the stack being Final State
identical to Array 2? FRONT REAR
\
(A) POP, POP, POP PUSH, PUSH,
PUSH
t
J K
t
L I
(B) POP, PUSH, POP, PUSH
(C)
(D)
POP, PUSH, PUSH, PUSH
POP, PUSH
I
2. Which sequence of operations would
transform the queue from the initial state
to the final state shown above?

(A) DEQUEUE, ENQUEUE(K) , \


ENQUEUE(L)

(B) ENQUEUE(L), ENQUEUE(K),


DEQUEUE

(C) DEQUEUE , DEQUEUE ,


ENQUEUE(L), ENQUEUE(K), \
ENQUEUE(J)

(D) DEQUEUE , DEQUEUE ,


ENQUEUE(J), ENQUEUE(K),
ENQUEUE(L)

GO ON TO THE NEXT PAGE


02215010/MJ/CAPE 2020
-3-

Item 5 refers to the following scenario.


3. Which of the following statements is true
for both a linear search and a binary search?
A student is asked to implement a stack
using arrays. The student devises the
(A) On average they search half the list.
following operations and programming
(B) In the worst-case scenario they
statements, where 'data' refers to the array
search the entire list.
which stores the data, 'ptr' is the address of
(C) They can be used for searching an
the last element inserted into the stack and
ordered list.
'ele' is the data element being acted on.
(D) They require that the list be
ordered.
Operation:
push (ele)
4. In which of the following situations would pop ()
the implementation of a queue be MOST
appropriate? I. return ele
II. Ifptr ! = array_size
(A) Storing information when functions III. ptr = ptr + 1
are called IV. ptr= ptr-1
(B) Translating computer language V. ele = data [ptr]
(C) Evaluating reverse polish VI. ele = data [ptr + 1]
mathematical expressions VIL data [ptr] = ele
(D) Rescheduling CPU time for VIII. data [ptr - 1] = ele
processes using round robin IX. If (ptr! = 0)

5. Which ordering below gives a working


implementation for the 'push (ele)'
operation?

(A) II, I, Ill


(B) II, III, VH
(C) VII, TV, II
(D) Vlll, III, I

GO ON TO THE NEXT PAGE


022150 l 0/MJ/CA PE 2020
-4-

6. Consider a circular queue, C, with a pointer refers to the following segment of


rear that references the location of the rear an incomplete algorithm for perfonning a
of the queue. The front pointer is set to zero linear search for target on an array list with
before any ADT operation. The following size n.
operations are performed on C.
I, II, III, IV represent the missing steps.
enqueue, enqueue, enqueue, dequeue,
dequeue, enqueue, enqueue, enqueue, count= 0
dequeue flag= false
REPEAT
Assuming that the locations range from O IF (list[count] = target) THEN
to 4, what is the value of the pointer front? I
END IF
(A) 0 II
(B) l UNTIL flag = true or III
(C) 2 IF flag= false THEN
(D) 3 IV
END IF

7. Figure I shows the state of a stack before


the pop operation is performed. Figure 2 8. Which of the following sets of steps would
shows the state after the pop operation complete the algorithm?
is performed. Which of the following
combinations of arrows correctly identifies (A) I - flag= true
the top of the stack structures? II - add I to count
Ill - count = n - 1
Figure I I IV - WRITE target not found
II
(8) I - flag = true
s -- III II - add 1 to count
B Ill - count = n
IV IV - WRITE target found
N -
(C) I - flag = true
II - add 1 to count
Ill - count= n -1
V TV - WRITE target found
Figure 2 ,

VI (D) I -flag= true


s - II - add l to count
B -
,
VII
UI-count= n
N -
,
Vlll IV - WRITE target not found

(A) I and V
(B) II and VI
(C) III and VII
(D) IV and VIII

02215010/MJ/CAPE 2020 GO ON TO THE NEXT PAGE


-5-

Items 11-12 refer to the following list.


Item 9 refers to the following diagram.
Frog, ant, dog, grasshopper, bee, fish,
1 1 1 6 1 9 1 14 1 11 1 20 1 22 1 snake

9. The target value is 19. A binary search is 11. Which of the following lists will NOT be
employed. What is the second value to be obtained at any point while applying the
compared with the target value, 19? selection sort algorithm?

(A) 14 (A) Ant, frog, dog, grasshopper, bee,


(B) 17 fish, snake
(C) 20 (B) Ant, bee, frog, dog, grasshopper,
(D) 22 fish,snake
(C) Ant, bee, dog, fish, frog,
grasshopper, snake
Item lO refers to the following list. (D) Ant, bee, dog, grasshopper, frog,
fish, snake
A C E F G K L

12. Assume that the list is sorted. When


10. The target value is I. A binary search is searching the sorted list, which of the
employed. How many comparisons are following will be found MOST quickly
made before it can be concluded that the using binary search?
letter I does NOT appear in the list?
(A) Ant
(A) 2 (B) Grasshopper
(B) 3 (C) Fish
(C) 4 (D) Dog
(D) 7

13. A queue is implemented using a one-dimensional array. Which of the following actions BEST
describes the dequeue operation performed using the array?

(A) Return the last element in the array.


(B) Return the first element in the array.
(C) Check that the queue is not empty, then return the first element in the array and shift the
remaining elements up one place.
(D) Check that the queue is empty, then return the first element in the array and shift the
remaining elements up one place.

GO ON TO THE NEXT PAGE


02215010/MJ/CAPE 2020
-6-

Itern 14 refers to a segment of an incomplete Item 15 refers to the following segment of


algorithm for sorting an array list of size n an incomplete algorithm for performing a
using a bubble sort. selection sort on an array list in ascending
order.
REPEAT
flag= false FOR i = 0 to n-2 DO
FOR pos = I to n - I DO min= i
IF(list[pos] >list[pos + 11) THEN FORj = i + I to n-1 DO
I IF I THEN
II min= j
III END IF
IV SWAP list[i] and~ II
END IF END FOR
END FOR END FOR
subtract 1 from n
UNTIL flag = false or n = 1
15. Which sequence of the following steps
would correctly complete the algorithm?
14. Which of the following sequences would
complete the algorithm? (A) I - list[j] < list[min]
II - list[min]
(A) I - flag = true
11 - list[pos] = list[pos + 1] (B) I - list[j] > list[min]
III - temp = list[pos] II - list[ min]
IV - list[pos + I] = temp
(C) I - list[j] < list[min]
(B) I- temp= list[pos] II - list[j]
II - list[pos] = list[pos + 1]
III - list[pos + I] = temp (D) I - list[j] > list[min]
IV - flag = true II - list[j]
(C) I- flag = true
II - temp= list[pos] 16. Which of the following terms represent
III - list[pos + 1] = temp
types of software maintenance?
IV - list[pos] = list[pos + 1]
I. Adaptive
(D) I - temp= list[pos] II. Corrective
II - list[pos + 1] = temp III. Defective
m - list[pos] = list[pos + l]
IV - flag = true (A) I and II only
(B) I and III only
(C) II and III only
(D) I, II and III
-7-

17. Which of the following outputs is a result 21. The MAIN goal of component testing is to
of using a CASE tool?
(A) expose faults in the components
(A) Cost/benefit analysis (B) demonstrate that the system meets
(B) Program definition its requirements
(C) Feasibility study (C) increase the supplier's confidence
(D) Prototype that the system meets its require-
ments
(D) test how one component interacts
18. Which of the following is LEAST helpful with others in the system
in an error message presented to a user?

(A) System-specific terms 22. Which of the following graphical tools is


(B) User-oriented language MOST suitable for showing how a software
(C) Description of the error development project and its subtasks
(D) Many options for recovery should be completed within a specified
timeframe?
19. A feasibility study
(A) Gantt chart
(A) describes a cost-effective means of (B) Decision tree
developing the proposed system (C) Dataflow diagram
(B) discusses whether the proposed (D) System flowchart
system will be cost effective
(C) is usually a lengthy and costly
process Items 23-24 refer to the following scenario.
(D) describes how current software and
hardware can be used to develop A car dealer uses a relational database to
the proposed system store data on the orders made by customers,
the types of cars in stock and payments
made.
20. Which of the following practices is NOT a
tenet of good programming style?
23. How many entities can be identified?
(A) Using comments for documentation
Appropriately spacing code (A) Two
(B)
Indenting where necessary (B) Three
(C)
Fixing logic errors (C) Four
(D)
(D) Five

24. What type of relationship exists between


the customer and payments?

(A) One to one


(B) One to many
(C) Many to one
(D) Many to many

GO ON TO THE NEXT PAGE


02215010/MJ/CAPE 2020
-8-

Which of the following is true of the


Which of the following attributes do NOT 29.
25. waterfall approach to the software
contribute to a system 's maintainability? development process?

(A) Useful documentation The following stage starts before


(B) Consistent, meaningful variable I.
the previous stage has finished .,
names The following stage should not start
(C) Pieces of code with well-defined II.
before the previous has finished. )
purpose Cascades from one phase of the
(D) Code that provides functionality Ill.
process to another.
not currently used, but which
will possibly be used in the
(A) 1 and II only
future
(8) I and Ill only
(C) II and III only
Which of the following describe the (D) 1, II and III
26.
contents of an entry in a data dictionary?

30. A small company with fewer than ten


l. The name of the element
employees is interested in replacing its
11. A list of related elements
The type and format of the element existing paper-based system with a software
HI.
application. Which of the following
is MOST appropriate for gathering
(A) land II only
(B) I and lII only information during analysis?
(C) 11 and III only
(D) I, II and Ill (A) Distributing questionnaires to
employees and clients of the
company
27. Which life cycle model approach is BEST (B) Researching company practices on
suited for a system with critical safety and the Internet
security requirements? (C) Interviewing priority clients of the
company
(A) Waterfall approach (D) Interviewing key people at the
(B) Formal transformation company
(C) Fountain approach
(D) Evolutionary development
31. Which of the following pieces of
information is NOT contained in a process
28. "The user's needs, the inputs, processing, control block?
outputs, storage and control capabilities
required to meet the needs" is a description (A) Amount of CPU time used
of (8) Estimated time to completion
(C) Job priority
(A) systems design (D) Process ID
(B) systems analysis
(C) functional requirements
(D) user interface, data and process
design

022150 I 0/MJ/CAPE 2020


GO ON TO THE NEXT PAGE

;·.-i-,·:
,,•i ,'f
•~':f;
_;,;:
-9-

32. Which of the following phrases BEST describes 'paging'?

(A) The division of documents into smaller chunks


(B) The assignment of chunks of a program called frames to main memory called pages
(C) The assignment of chunks of a progam called frames to different secondary storage media
(D) The assignment of chunks of a program called pages to chunks of memory called frames

Item 33 refers to the cable shown in the following diagram.

Insulator
I
I
Iniler
I
Insulator
conductor
conductor

33. What type of cable is shown in the diagram?

(A) Coaxial
(B) Fibre optic
(C) Firewire
(D) Shielded twisted pair

34. The term 'firewire' refers to a 35. A webmaster has decided to design his
website offline and upload the various files
(A) type of cabling that allows com- and graphics to the web server remotely.
munication between computers
(B) software running on a computer Which of the following methods would be
that protects it from external BEST suited for providing the FASTEST
attacks and MOST secure way of uploading the
(C) high-speed serial bus system data?
(D) type of computer virus
(A) FTP

l (8)
(C)
(D)
GSM
HTML
UML

GO ON TO THE NEXT PAGE


02215010/MJ/CAPE 2020
- 10 -

Item 36 refers to the following diagram.

Computer Modem Modem Computer

36. The diagram BEST illustrates

(A) routing
(B) addressing
(C) modulation and demodulation
(D) multiplexing and expandibility

37. Which of the following outcomes relates 39. Which of the following phrases BEST
to the use of virtual memory? describes ' paging ' ?

(A) Results in faster execution speeds (A) The division of documents into
(B) Creates an illusion that the computer smaller chunks
has more memory (B) The assignment of chunks of a
(C) Ensures that memory works faster program called frames to main
(D) Ensures that all programs are in memory called pages
memory (C) The assignment of chunks of a
progam called frames to different
38.
secondary storage media
Which IEEE standards can be employed (D) The assignment of chunks of a
when setting up a wireless LAN for
program called pages to chunks
wireless devices needing transfer rates
of memory caJled frames
GREATER than 20 mbps?

I. 802.11 a
Item 40 refers to the following diagram .
II. 802.11 b
III. 802. l l g

(A) I only
(B) II only
(C) l and II only
(D) I and III only

40. X and Y respectively represent a

(A) server and work station


(B) work station and node
(C) server and hub
(D) hub and node

022150 10/M J/CAP E 2020 GO ON TO THE NEXT PAG E

·y;:t'~
, .,...
. ' .:&.-, .
- l1 -

41. Which of the following determines the 44. Which of the following is true about a
amount of time a running process gets process being scheduled with a non-pre-
to use the CPU when a round-robin emptive algorithm?
scheduling algorithm is used?
(A) It is placed at the top of the ready
(A) The order of arrival of the process queue if it has a higher priority
on the ready queue than all the processes already in
(B) The priority of the process the queue.
(C) The estimated running time of the (B) Once it enters the running state, it
process is allowed to run to completion
(D) The fixed time of the operating or until it yields the processor.
system (C) Once it enters the running state, it
is given a fixed amount of time
to use the CPU after which other
42. A running process initiates an input request processes get a chance to use the
to get data from the keyboard. Which of the CPU.
following state transitions will take place (D) Once it enters the running state, it is
when the data is made available? given a variable amount ohime
to use the CPU depending on its
(A) Ready to running priority.
(B) Running to ready
(C) Blocked to ready
(D) Blocked to running 45. In a network where the running applications
generate a significant amount of traffic,
which of the following devices would NOT
Item 43 refers to the following diagram. be suitable?

Process A
(A) Router
(B) Switch
(C) Hub
(D) Bridge

Process B

43. What does the diagram above represent?

(A) Deadlock
(B) Round robin
(C) Interrupt
(D) Fetch-decode-execute cycle

END OFTEST

IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.

022150 I 0/MJ/CAPE 2020

You might also like