Quelpr

CAPE Computer Science Unit 2 · 2012 · Paper 2 · Question 4(b)

A function binarySearch(arr, n, key) searches an integer array arr of size n for key, returning its index or -1 if not found.

Describe three tests that can be used to determine if binarySearch is working correctly.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 4(a)(i)Describe the main components of an entity-relationship model.[6 marks]
  2. 4(a)(ii)Draw an entity-relationship model for the described software project and employee scenario.[13 marks]

More practice: the rest of this paper · more Implementation, Testing, and Maintenance questions · all CAPE Computer Science Unit 2 past papers