Quelpr

CAPE Computer Science Unit 2 · 2005 · Paper 1 · Question 15(a)(ii)

A Temperature object has a method toFahrenheit, which accepts a parameter, centigrade (a floating point value) and converts this value to a fahrenheit temperature using the calculation: fahrenheit = (9/5) * centigrade + 32. Describe the steps that should be taken in order to unit test the toFahrenheit method.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 15(a)(i)Briefly distinguish between 'unit testing' and 'system testing'.[2 marks]
  2. 15(b)Briefly describe TWO types of documentation normally included in a software package.[4 marks]

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