Quelpr

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. 1(a)(i)2 marksWrite code to declare the variables required for the stack.
  2. 1(a)(ii)4 marksWrite a function to push a character, c, onto the stack, accounting for stack overflow.
  3. 1(a)(iii)6 marksWrite a function to pop a character from the stack, accounting for stack underflow.
  4. 1(b)(i)7 marksExplain what a 'linked list' is using a labelled diagram.
  5. 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.
  6. 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.
  7. 2(a)(i)2 marksExplain the purpose of the outer 'for' loop.
  8. 2(a)(ii)3 marksExplain carefully the process occurring in the inner 'for' loop.
  9. 2(a)(iii)1 markState why the upper limit for j in the inner 'for' loop is (numItems - i) rather than (numItems).
  10. 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.
  11. 2(a)(iv)b)2 marksShow the contents of the array at the end of the SECOND and THIRD passes of the bubble sort.
  12. 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.
  13. 2(c)6 marksDescribe the principles behind binary search when searching for an item in an array.
  14. 2(d)(i)1 markHow many comparisons does a linear search make before determining that 50 is not present in the array?
  15. 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.
  16. 3(a)(i)4 marksExplain what is meant by the term 'prototyping'.
  17. 3(a)(ii)4 marksExplain how prototyping can be used during the development of a software product.
  18. 3(a)(iii)2 marksState TWO weaknesses of the prototyping approach (evolutionary development).
  19. 3(b)9 marksDraw an entity-relationship model for the described hospital scenario, clearly naming relationships and specifying cardinality.
  20. 3(c)6 marksDescribe THREE tests that should be part of the test plan to unit test the binarySearch() function.
  21. 4(a)9 marksState THREE traditional methods of determining requirements of a new software system, identifying ONE advantage and ONE disadvantage of each method.
  22. 4(b)(i)3 marksState the purpose of external entities, data stores, and processes when used in a Data Flow Diagram (DFD).
  23. 4(b)(ii)3 marksFor external entities, data stores, and processes, give a diagram showing how each symbol is used in a DFD.
  24. 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…
  25. 4(c)4 marksDistinguish between 'functional requirements' and 'non-functional requirements', providing ONE example of each type.
  26. 5(a)4 marksExplain why a peer-to-peer network is generally considered a special case of a client/server network.
  27. 5(b)(i)2 marksDiscuss network security as an issue when developing a computer network.
  28. 5(b)(ii)2 marksDiscuss expandability as an issue when developing a computer network.
  29. 5(b)(iii)2 marksDiscuss interconnectivity as an issue when developing a computer network.
  30. 5(c)(i)5 marksList, in the correct order, the LAST FIVE layers of the OSI model for computer communication.
  31. 5(c)(ii)6 marksFor any THREE of the layers listed in (c)(i), describe the role EACH plays in data communication.
  32. 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.
  33. 6(a)(i)2 marksIndicate what situation would cause the game process to move from ready to running.
  34. 6(a)(ii)2 marksIndicate what situation would cause the game process to move from ready to blocked.
  35. 6(b)(i)1 markOutline the function of the process control block (PCB) in an operating system.
  36. 6(b)(ii)8 marksBriefly describe FOUR components of a PCB.
  37. 6(c)(i)3 marksExplain how device drivers function in an operating system.
  38. 6(c)(ii)3 marksState THREE reasons why device drivers may need to be updated.
  39. 6(d)6 marksBriefly describe batch systems, multi-programming systems, and multi-user systems.

More CAPE Computer Science Unit 2 papers