Quelpr

CAPE Computer Science Unit 2 · 2013 · Paper 2 · Question 3(c)

Given function prototype `int binarySearch(int items[], int numItems, int key)` which returns the index of key or -1 if not found.

Describe THREE tests that should be part of the test plan to unit test the binarySearch() function.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 3(a)(i)Explain what is meant by the term 'prototyping'.[4 marks]
  2. 3(a)(ii)Explain how prototyping can be used during the development of a software product.[4 marks]
  3. 3(a)(iii)State TWO weaknesses of the prototyping approach (evolutionary development).[2 marks]
  4. 3(b)Draw an entity-relationship model for the described hospital scenario, clearly naming relationships and specifying cardinality.[9 marks]

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