0% found this document useful (0 votes)
13 views

CompSci U2 P2 2010

Uploaded by

Craig Williams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

CompSci U2 P2 2010

Uploaded by

Craig Williams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

TEST CODE 02215020

FORM TP 2010161 MAY/JUNE 2010

CARIBBEAN E XAM I NAT I O N S COUNCIL

ADVANCED PROFICIENCY EXAMINATION


COMPUTER SCIENCE

UNIT 2 – FURTHER TOPICS IN COMPUTER SCIENCE

PAPER 02

2½ hours

17 MAY 2010 (p.m.)

INSTRUCTIONS TO CANDIDATES

1. DO NOT open this examination paper until instructed to do so.

2. Answer ALL questions from the THREE sections.

Copyright © 2009 Caribbean Examinations Council ®.


All rights reserved.

02215020/CAPE 2010
-2-

SECTION A

DATA STRUCTURES

Answer BOTH questions.

1. abstract data type (ADT). [2 marks]

(b) (i) Give an ADT operation that can be used to store an element in a singly linked list.
[1 mark ]

(ii) A singly linked list is created and the following elements are placed in the linked
list in the order given:

25, 50, 75

Draw the list after all three elements have been placed in the list using the ADT
operation at (i) above, clearly indicating the beginning and end of the list.
[3 marks]

(c) The Queue ADT provides an enqueue (Queue, data) operation and a dequeue (Queue)
operation.

(i) Suppose that you need to implement a Queue for storing a set of integer values.
Describe the computer storage that you will use for implementing the queue
operations. [4 marks]

(ii) Write the C code for a function that implements the enqueue (Queue, data)
operation assuming that data is an integer value. Your function must deal with
[5 marks]

(d) The Stack Abstract Data Type (ADT) provides a pop (Stack) operation, a push (Stack,
data) operation, and an isEmpty (Stack) operation.

You are given a queue, q, with a set of elements. Using a stack, stk, write an algorithm to
reverse the order of all the elements in q. Your algorithm must only use Stack and Queue
ADT operations. [6 marks]

(e) A stack can be implemented using a singly linked list.

Explain how the Stack ADT operations will be implemented if a singly linked list is used.
[4 marks]

Total 25 marks

GO ON TO THE NEXT PAGE


02215020/CAPE 2010
-3-

2. (a) A set of 10 integers is stored in a one-dimensional array as follows:

location 0 1 2 3 4 5 6 7 8 9

data 10 3 2 15 6 5 8 11 20 19

A selection sort algorithm must be used to sort the 10 integers in ascending order (i.e.
smaller values must come before bigger values).

(i) Describe how the selection sort algorithm works to sort a set of 10 integers in
ascending order.
[10 marks]

(i.e. three diagrams in all). [3 marks]

(b) A one-dimensional array num consists of 20 integers. The integers are not sorted.

Write C programming code to accept an integer, target, from the user and determine if
target is present in num. If target is found in num, print the location in which it was
found. If target is not present in num, print an appropriate error message.
[10 marks]

(c) When should binary search be used on an array? [2 marks]

Total 25 marks

GO ON TO THE NEXT PAGE


02215020/CAPE 2010
-4-

SECTION B

SOFTWARE ENGINEERING

Answer BOTH questions.

3.
TWO other attributes of well-engineered software. [4 marks]

(b) Explain, giving TWO reasons, why it is important to involve end users and management
in the development of a software product. [4 marks]

(c) Explain why a software system that is used in a real-world environment must be upgraded
or become progressively less useful. [3 marks]

(d) The hiring process of a certain organisation after a vacancy is advertised is as follows:

ment letter is sent to each applicant indicating that his/her application has been received.

are selected for an interview. The selected applicants are informed of the date and time of
their interviews. After the interviews are held, the successful applicant’s data is moved to

letters are sent to each applicant informing him or her of the outcome of the application.

[14 marks]

Total 25 marks

GO ON TO THE NEXT PAGE


02215020/CAPE 2010
-5-

4. (a) Two deliverables of the analysis phase of software engineering are a feasibility study and
a .

(i) State TWO reasons why the feasibility study is undertaken. [2 marks]

[3 marks]

(b) A certain organisation consists of a number of departments. Each department employs one
or more employees but an employee is employed in only one department. The organisation

as an employee number to uniquely identify each employee. Employees have one or more
skills. A department undertakes various kinds of projects. Employees may be assigned to
one or more projects being undertaken. A project consists of a set of tasks and employees
use one or more of their skills when performing tasks on projects.

Draw an entity-relationship model for the above scenario. [14 marks]

(c) Consider a function, lsearch, which accepts the following parameters:

arr, an array of integers as a parameter,


n, the amount of elements in arr, and
key, an integer being searched for

and performs a linear search on arr for key. If key is found, the function returns the
location where the key was found, otherwise, it returns –1.

lsearch is working
correctly. [6 marks]

Total 25 marks

GO ON TO THE NEXT PAGE


02215020/CAPE 2010
-6-

SECTION C

OPERATING SYSTEMS AND COMPUTER NETWORKS

Answer BOTH questions.

5. (a) (i) Draw a diagram to show the layers of the OSI model for computer communication.
[6 marks]

(i) above. [6 marks]

handled? [4 marks]

[6 marks]

(d) In an operating system, explain what can cause a process to move from the running state
to the ready state. [3 marks]

Total 25 marks

6. The diagram below shows the network design of a company which utilizes a client-server model
for its data and applications.

A ISP
C
Firewall

GO ON TO THE NEXT PAGE


02215020/CAPE 2010
-7-

(a) Complete the labelling of the diagram, giving the names of A, B and C. [3 marks]

(b) State, giving a reason, which network topology is being employed. [2 marks]

[2 marks]

(d) List ONE device which is NOT shown in the diagram that may also be found on the
network. [1 mark ]

[3 marks]

(f) What is the meaning of the abbreviation ISP? [1 mark ]

(g) What service would the company likely use from the ISP? [1 mark ]

(h) If the company had an Intranet, on what protocol would it be running? [1 mark ]

[3 marks]

[2 marks]

(k) Both devices labelled A and B


systems.

(i) Describe ONE function of modern operating systems. [2 marks]

(ii) What is the difference between the type of operating system running on A and
that running on B? [2 marks]

[2 marks]

Total 25 marks

END OF TEST

02215020/CAPE 2010

You might also like