Computer Science · Oct / Nov 2021 · Paper 21 · Question 3
0478
As printed in the paper
The question as text
A program has been written to check the value of a measurement. The measurement must be a positive number and given to three decimal places, for example, 3.982
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
3(a)(i)[4]
one mark for sample, one mark for reason max four
Normal Sample
any positive value with three decimal places e.g. 5.682
Reason
to test that normal data is accepted and processed correctly
Erroneous Sample any value that would be rejected e.g. 5.6 or -1.345 or seven
Reason
to test that erroneous data is rejected
3(a)(ii)[3]
Reason to test that 0.000 / -0.001 / highest possible non-positive is rejected and 0.001 / 0.000 / lowest positive number is accepted
Sample 1 0.000
Sample 2 0.001
3(b)[3]
One mark
To check that values are entered as intended // to prevent incorrect values that meet the validation criteria being accepted Two marks
Asking the user to enter the value twice and comparing the values // double entry (1) only accepting a value if both entries are identical (1)
or
Displaying the value as it is entered (1) so the user can put right errors have been made as the value was entered (1)
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

