Cape Computer Science 2016 Unit 2 P2
Cape Computer Science 2016 Unit 2 P2
COMPUTER SCIENCE
UNIT 2 – Paper 02
2 hours 30 minutes
4. 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.
5. If 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.
SECTION A
1. (a) For EACH of the following scenarios, identify which data structure would be MOST
appropriate when writing software.
L )RUDFDOOFHQWUHHQVXUHWKDWFDOOVDUHDQVZHUHGLQ¿UVWLQ¿UVWRXWRUGHU
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[3 marks]
(b) In the space provided below, write code to implement the following function. The function
accepts a string s, stores the string in a new node and inserts this node at the front of an
existing linked list. Assume that top SRLQWVWRWKH¿UVWQRGHRIWKHH[LVWLQJOLVW
[3 marks]
(c) Q is an empty queue of size 5. In the space provided below, draw diagrams to show the
DO NOT WRITE IN THIS AREA
contents of the queue after each of the following lines is executed: Lines 3, 4 and 5. Show
all elements in the queue for each illustration.
[3 marks]
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[6 marks]
(e) In the space provided below, write C code which will reverse the order of a set of items in
[10 marks]
Total 25 marks
2. D $FHUWDLQVLQJO\OLQNHGOLVWLVORDGHGZLWK¿YHLQWHJHUV7KHKHDGRIWKHOLVWLVDFFHVVHGYLD
DO NOT WRITE IN THIS AREA
top.
L ([SODLQKRZWKH¿UVWQRGHFDQEHGHOHWHG
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[3 marks]
....................................................................................................................................
....................................................................................................................................
DO NOT WRITE IN THIS AREA
....................................................................................................................................
....................................................................................................................................
[3 marks]
LLL ([SODLQKRZDQ\QRGHEHWZHHQWKH¿UVWDQGODVWFDQEHGHOHWHG
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
DO NOT WRITE IN THIS AREA
....................................................................................................................................
[4 marks]
(b) (i) Write C code to declare an array number that can store 10 integers.
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[2 marks]
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[4 marks]
(iii) In the space provided below, write C code to accept an integer key from the user
DO NOT WRITE IN THIS AREA
and search number to see if key is present using linear search. If found, print
the location of key; otherwise, print “Key Not found”.
DO NOT WRITE IN THIS AREA
DO NOT WRITE IN THIS AREA
[9 marks]
Total 25 marks
SECTION B
DO NOT WRITE IN THIS AREA
SOFTWARE ENGINEERING
3. (a) Apart from time and costs, outline TWO factors that may be considered when completing
a risk assessment for software development.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[2 marks]
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks]
DO NOT WRITE IN THIS AREA
(c) List FOUR reasons why the Waterfall model might not be suitable for managing most
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
(d) Describe TWO weaknesses of the Rapid Prototyping model of software development.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
(e) The following case provides details for a university registration system. In the space
SURYLGHGRQSDJHGUDZD/HYHOGDWDÀRZGLDJUDPWRGHWDLOWKHÀRZRIGDWDDVGHVFULEHG
in the case.
A prospective student sends an application in the hope of being accepted by a university. DO NOT WRITE IN THIS AREA
Each application is inspected and a letter is sent to the prospective student to indicate
whether he/she was accepted by the university or not. Students who have been accepted
must take their acceptance letter and all supporting documents to the university in order
WRUHJLVWHU5HJLVWUDWLRQGHWDLOVDUHWKHQVWRUHGLQWKHVWXGHQWLQIRUPDWLRQ¿OHDQGDVWXGHQW
LGHQWL¿FDWLRQQXPEHULVLVVXHG7RFRPSOHWHUHJLVWUDWLRQWKHVWXGHQWXVHVKLVKHUVWXGHQW
,'WRSD\XQLYHUVLW\DQGRWKHUVXQGU\IHHVYLDFUHGLWFDUG)HHVDUHSURFHVVHGDQG¿QDQFLDO
GHWDLOVDUHVWRUHGLQWKH¿QDQFH¿OH$UHFHLSWLVLVVXHGWRWKHVWXGHQWDWWKHHQGRIWKLV
SURFHVVWRFRQ¿UPIHHSD\PHQWDQGWKHFRPSOHWLRQRIUHJLVWUDWLRQ1RWHWKDWDSSOLFDWLRQ
form data and student registration data are passed through the system after the related
processes.
[12 marks]
Total 25 marks
4. The following questions are related to software development and database design.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[2 marks]
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks]
(c) Differentiate between ‘functional’ and ‘nonfunctional’ requirements. Give ONE example
of EACH term.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
(d) Explain TWO types of tests completed during the testing phase, other than white box and
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
DO NOT WRITE IN THIS AREA
DO NOT WRITE IN THIS AREA
(e) The Science College is a university which offers several pure and applied science courses.
In the space provided below, draw an entity relationship diagram to represent the scenario
DERYH2Q\RXUGLDJUDPGH¿QH$//UHODWLRQVKLSVDQGFDUGLQDOLWLHVLQ%27+GLUHFWLRQV
You MUST follow the conventions of ER diagramming to be awarded full marks.
[12 marks]
Total 25 marks
SECTION C
DO NOT WRITE IN THIS AREA
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[4 marks]
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks]
DO NOT WRITE IN THIS AREA
(c) With the aid of a diagram, explain the role of a switch in a local area network.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks] DO NOT WRITE IN THIS AREA
(d) How is data communicated in an IEEE802.11b network? Use a diagram in your response.
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
DO NOT WRITE IN THIS AREA
DO NOT WRITE IN THIS AREA
[6 marks]
H %ULHÀ\H[SODLQ($&+RIWKHIROORZLQJIDFWRUVWKDWDUHFRQVLGHUHGZKHQEXLOGLQJDQHWZRUN
....................................................................................................................................
....................................................................................................................................
(ii) Security
....................................................................................................................................
....................................................................................................................................
(iii) Management
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(v) Interconnectivity
....................................................................................................................................
....................................................................................................................................
[5 marks]
(f) Explain the role of any TWO of the ¿UVW ¿YH OD\HUV RI WKH 26, PRGHO IRU QHWZRUN
communication.
..............................................................................................................................................
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
Total 25 marks
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
(ii) Paging
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
DO NOT WRITE IN THIS AREA
....................................................................................................................................
(iii) Thrashing
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
....................................................................................................................................
[6 marks]
..............................................................................................................................................
..............................................................................................................................................
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
[2 marks]
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks]
G $FRPSXWHUDSSOLFDWLRQQHHGVWRUHDGDVSHFLDO¿OHRQDGLVNWRGHWHUPLQHWKHWHPSHUDWXUH
at which the CPU is operating.
Explain how the operating system uses interrupts in the above scenario.
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[5 marks]
H 'LVWLQJXLVKEHWZHHQDދPXOWLXVHUV\VWHPތDQGDދEDWFKSURFHVVLQJV\VWHPތ
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[4 marks]
GO ON TO THE NEXT PAGE
02215020/CAPE 2016
‘‘*’’Barcode Area”*”
Sequential Bar Code
- 23 -
I %HVLGHVSDVVZRUGVRXWOLQH21(ZD\LQZKLFK¿OHVFDQEHSURWHFWHG
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[2 marks]
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
DO NOT WRITE IN THIS AREA
..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................
[3 marks]
Total 25 marks
DO NOT WRITE IN THIS AREA
END OF TEST
IF YOU FINISH BEFORE TIME IS CALLED, CHECK YOUR WORK ON THIS TEST.
02215020/CAPE 2016
‘‘*’’Barcode Area”*”
Sequential Bar Code