You are on page 1of 24
& rest cope 02215020 FORM TP 2017180 MAYJJUNE 2017 CARIBBEAN EXAMINATIONS COUNCIL CARIBBEAN ADVANCED PROFICIENCY EXAMINATION® COMPUTER SCIENCE FURTHER TOPICS IN COMPUTER SCIENCE, UNIT 2— Paper 02 2hours 30 minutes READ THE FOLLOWING INSTRUCTIO’ ‘This paper consists of SIX questions. Answer ALL questions. ‘Write your answers in the spaces provided in this booklet. ‘Do NOT write in the margins. If you need to rewrite any answer and there is not enough space to do so on the ‘original page, you must use the extra lined page(s) provided at the back of this booklet. Remember to draw a line through your original answer, ‘you use the extra page(s) you MUST write the question number clearly in the box provided at the top of the extra page(s) and, where relevant, include ‘the question part beside the answer. DO NOT TURN THIS PAGE U! Copyright © 2016 Caribbean Examinations Couneil All rights reserved. =="Tarcode Arar (02215020/CAPE 2017 Sequential Bar Code SECTION A DATA STRUCTURES Answer BOTH questions. (a) The following ten integers are stored in an array, are. location [ 0 [ 1 | 2 | 3 | 4 @ s |u| 2 [7 [3s s[e«[7r]s]o a4 fs [os | | a Write a seri for the key 19, ss of steps to describe how the binary scarch algorithm will Gi 02215020/CAPE 201 State whether this search algorithm ret answer with an explanation [6 marks] tums the correct location. Support your GO ON TO THE NEXT PAGE rea" vemiial Rar Cade (b) The following five integers are stored in an array, arrBubble, location [0 | 1 | 2 [3 [4 daa. a fa | [3 [os Use the bubble sort ta sort this array im ascending order. Draw the array after each complete pass of the bubble sort, [3 marks] GOON TO THE NEXT PA\ rea Sequential Bar Code 02215020/CAPE 2017 fc) Acsingly linked list exists with a single node containing the value 8. () Draw this initial linked list, [2 marks] st. With the use of a ed list, ) The number 3 should be added to the beginning of the diagram, explain how this murmber will be added to the li GO ON TO THE NEXT PAC Curae] (02215020/CAPE 2017 “Te (d) Youre given the following snippet of code. dnt size = 5; int p{] = (10, 50, 30, 40, 60h Write C code to sort the array using simple selection sort. [marks] ‘Total 25 marks GO ON TO THE NEXT PAGE (02215020/CAPE 2017 rea (2) You are given a stack, stk, with an unknown number of clements. Using an appropriate auxiliary structure (for example, stack, queue), write an algorithm to reverse the order of the elements in stk. Your algorithm may use stack and queue abstract data type (ADT) ‘operations only, GO ON TO THE NEXT PAGE 099146000/C APR ON17 9. (b) ‘The procedures AID or MULT cause the following to occur: + The stack is popped twice +The two popped items are added (ADD) or multiplied (MULT). ‘+The result is pushed back on to-the stack. ‘Assume that the stack is empty initially. ‘Draw the contents of the stack after the following operations: PUSH (Stack, 5) PUSH (Stack, 2) PUSH (Stack, 4) MULT (Stack) ADD (Stack) [5 marks] GO ON TO THE NEXT PAGE 02215020/CAPE 2017 -10- (©) A queue ADT is implemented in C using appropriate variables and functions. (Declare the variables that are needed for the implementation of the queue in C and describe the purpose of EACH variable. Assume that the queue will store at most 1000 integer elements. [6 marks] GO ON TO THE NEXT PAGI (02215020/CAPE 2017 -u- (ii) Write C code for the following functions: void enqueue (int x} int dequeue ( } ‘You must eater for queue overflow and underflow conditions, Print appropriate messages for these cases GO ON TO THE NEXT PAGE 0221S020/CAPE 2017 -12- [8 marks] ‘Total 25 marks GOON TO THE NEXT PAGE 02215020/CAPE 2017 -13- NOTHING HAS BEEN OMITTED. GO ON TO THE NEXT PAGE 02215020/CAPE 201 -14- SECTION B SOFTWARE ENGINEERING Answer BOTH questions. (a) Im a company’s payroll process, an employee submits work hours on a timesheet for verification and approval, Once approved, the timesheet is used to calculate the employee’s salary as follows: + ‘The emplayee recard is checked to see what rate of pay the emplayee is entitled to, + The pay is calculated and the payroll records are updated with the salary amount. + A paycheck is issued to the employee. ‘Monthly reports are generated based on the payroll data and sent to management forreview. Draw a Level-0 data flow diagram that depicts the above scenario. GOON TO THE NEXT PAGE S020/CAPE 2017 -15- [12 marks] GO ON TO THE NEXT PAGE 02215020 CAPE 2017 tb) (ce) (d) -16- Define the icrm ‘deliverable’ in the context of the Software Development Life Cycle (SDLC). [2 marks] scribe how the fountain approach to software development is different from the (©) Define prototyping and outline how it is useful in the software development process. a HIPO chart? [2 marks] ‘Total 25 marks GO ON TO THE NEXT PAGE 02215020/CAPE 2017 -18- [4 marks] (b) A not-for-profit organization, SavePlanet runs a number of different programmes. Each programme is managed by a coordinator, Coordinators are hired by SavePlanet and a coordinator can manage only one programme. There may he zero or more volunteers in 8 programme and volunteers can participate in one or more programmes. The following information is stored on cvery programme: programme id (primary key) and name. Draw an entity-relationship made! to represent the scenario above. [9 marks] GO ON TO THE NEXT PAGE rea ‘Sequential Bat Cade 02215020/CAPE 2017 -19- (c) A function, numOceurrences, returns the number of occurrences of an integer, m, in an integer array, arr. The function is defined as follows: int numOccurrences{ int arr[ ], int n) Describe THREE tests which can be used to determine if the function is working correctly. [6 marks] GO ON TO THE NEXT PAGE rea Sequential Bar Code 215020/CAPE 20) (dy -20- ‘Three propertics of well-cngincered software arc usability, maintainability and portability. Explain what these terms mean. Usability Maintainability 16 marks] ‘Total 25 marks (a) (b) © -21- SECTION C ‘OPERATIN ‘YSTEMS AND COMPUTER NETWORKS Answer BOTH questions. In what type of computing model is the Hypertext Transfer Protocol (HTTP) used’? [1 mark] Describe the steps involved in HTTP when # user views a webpage using a web browser [S marks] ‘An e-commerce site can be accessed via the following URLs: hitp:/wwww.buythings com OR s:/hwww.buythings. com Which URL would be preferred by an online shopper? Justify your answer. [3 marks] GO ON TO THE NEXT PAGE 0221 S020/CAPE 2017 -2- (4) What is the relationship between a process and a process control block? ic} ~ —— ~ ~ 1S marks] (2) Define ‘paging’. (g) Define ‘thrashing’. -2- (h) State TWO possible consequences of thrashing. [2 marks @ Give ONE reason why thrashing might occur. [2 marks] ‘Total 25 marks GO ON TO THE NEXT PAGE 0221 020/CAPE 2017 24. (2) Your friend uses a desktop computer connected directly to his modem which is in turn connected to his Internet Service Provider via cable. He has recently purchased a laptop and smartphone and would like to connect ta the Internet using these devices as well, (i) With the use ofa clearly labelled diagram, explain what additional device he wi need, the purpase of the device and how all devices will be connected, [6 marks] GOON TO THE NEXT PAGE ["¥ "anode Area") 0221 S020/CAPE 2017 -2s- (a) Imaddition, he would like to copy files from the laptop to the desktop directly and ‘vice versa without the use of the Internet or secondary storage media, Identify what type of device is needed. (b) Describe the functions of the three layers at the bottom of the OSI model [6 marks] (©) Which standard suffers from more interference, 802.114 or 802.1 1b? State TWO reasons to support your answer. GO ON TO THE NEXT PA C—rtmbae (02215020/CAPE 201 -26- (d) Describe spooling, with the aid of an appropriate example. [B marks] (c} There are several workstations on a bus network. Device A sends a message to Device B. Describe how the message is sent from Device A to Device B, clearly stating ifthe other workstations arc affected. (0) Give TWO disadvantages of a bus nctwork topology. [2 marks] ‘Total 25 marks END OF TEST IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TES

You might also like