CAPE Computer Science Unit 2 · 2013 · Paper 2
39 questions and parts from this paper. Open one to see it in full, then practise it on Quelpr and get it marked against the mark scheme.
- 1(a)(i)2 marksWrite code to declare the variables required for the stack.
- 1(a)(ii)4 marksWrite a function to push a character, c, onto the stack, accounting for stack overflow.
- 1(a)(iii)6 marksWrite a function to pop a character from the stack, accounting for stack underflow.
- 1(b)(i)7 marksExplain what a 'linked list' is using a labelled diagram.
- 1(b)(ii)a)3 marksWith the aid of a diagram, explain how a new node can be inserted at the top of the linked list.
- 1(b)(ii)b)3 marksWith the aid of a diagram, explain how a new node can be inserted at the bottom of the linked list.
- 2(a)(i)2 marksExplain the purpose of the outer 'for' loop.
- 2(a)(ii)3 marksExplain carefully the process occurring in the inner 'for' loop.
- 2(a)(iii)1 markState why the upper limit for j in the inner 'for' loop is (numItems - i) rather than (numItems).
- 2(a)(iv)a)4 marksGiven the array a with 5 values: [5, 1, 4, 8, 2], show the contents of the array after each stage during the FIRST pass of the bubble sort.
- 2(a)(iv)b)2 marksShow the contents of the array at the end of the SECOND and THIRD passes of the bubble sort.
- 2(b)4 marksAn array contains 7 integers: [34, 5, 10, 1, 9, 23, 14]. Using the selection sort algorithm, show the array contents after each of the first four passes.
- 2(c)6 marksDescribe the principles behind binary search when searching for an item in an array.
- 2(d)(i)1 markHow many comparisons does a linear search make before determining that 50 is not present in the array?
- 2(d)(ii)2 marksHow many comparisons does a binary search make before determining that 50 is not present in the array? Show your working.
- 3(a)(i)4 marksExplain what is meant by the term 'prototyping'.
- 3(a)(ii)4 marksExplain how prototyping can be used during the development of a software product.
- 3(a)(iii)2 marksState TWO weaknesses of the prototyping approach (evolutionary development).
- 3(b)9 marksDraw an entity-relationship model for the described hospital scenario, clearly naming relationships and specifying cardinality.
- 3(c)6 marksDescribe THREE tests that should be part of the test plan to unit test the binarySearch() function.
- 4(a)9 marksState THREE traditional methods of determining requirements of a new software system, identifying ONE advantage and ONE disadvantage of each method.
- 4(b)(i)3 marksState the purpose of external entities, data stores, and processes when used in a Data Flow Diagram (DFD).
- 4(b)(ii)3 marksFor external entities, data stores, and processes, give a diagram showing how each symbol is used in a DFD.
- 4(b)(iii)6 marksDraw a level-0 data flow diagram for the scenario where a customer sends an order, the system checks inventory, sends shipping notices to warehouse for dispatch and updates stock if available, or returns rejected orders…
- 4(c)4 marksDistinguish between 'functional requirements' and 'non-functional requirements', providing ONE example of each type.
- 5(a)4 marksExplain why a peer-to-peer network is generally considered a special case of a client/server network.
- 5(b)(i)2 marksDiscuss network security as an issue when developing a computer network.
- 5(b)(ii)2 marksDiscuss expandability as an issue when developing a computer network.
- 5(b)(iii)2 marksDiscuss interconnectivity as an issue when developing a computer network.
- 5(c)(i)5 marksList, in the correct order, the LAST FIVE layers of the OSI model for computer communication.
- 5(c)(ii)6 marksFor any THREE of the layers listed in (c)(i), describe the role EACH plays in data communication.
- 5(d)4 marksA company has four desktop computers, one server, twisted pair cable, and a switch. Draw a diagram illustrating how the devices can be connected, carefully labelling all components.
- 6(a)(i)2 marksIndicate what situation would cause the game process to move from ready to running.
- 6(a)(ii)2 marksIndicate what situation would cause the game process to move from ready to blocked.
- 6(b)(i)1 markOutline the function of the process control block (PCB) in an operating system.
- 6(b)(ii)8 marksBriefly describe FOUR components of a PCB.
- 6(c)(i)3 marksExplain how device drivers function in an operating system.
- 6(c)(ii)3 marksState THREE reasons why device drivers may need to be updated.
- 6(d)6 marksBriefly describe batch systems, multi-programming systems, and multi-user systems.