Past-paper question · 2014 October-November · Paper 22 · Q3(c)(ii)

Question 3(c)(ii) 2014 · October-November · Paper 22 · 9 marks

Original past-paper question for 3(C)(II)
Original past-paper question for 3(C)(II)
Original past-paper question for 3(C)(II)
Original past-paper question for 3(C)(II)
Reveal official mark-scheme answer

Official answer for Question 3

Part (c)

(ii)

✓
Type of test data Example test data Justification
✓
Normal/valid Any integer between 1 A column number with top row free
✓
and 7
✓
Boundary/Borderline Any integer between 1 A column number with column full/nearly
✓
and 7 full
✓
number, e.g. 1/7 (first or last column)
✓
Erroneous/Invalid Any integer out of out of range
✓
range (<1 or >7)

1 mark per cell correctly entered[9]

Mark scheme 9691_w14_ms_22.pdf →

Show text version of question

Question 3

Part (c)

(ii)

Question 3

A game is played by two players. Player A uses white tokens ( ). Player B uses black tokens ( ).

The players take turns dropping tokens into a vertical grid. The tokens fall straight down and occupy the next available space in the chosen column. The aim of the game is to connect four of one’s own colour tokens. This must be done in a vertical, horizontal or diagonal line.

Here is one example after Player A has had 2 turns and Player B has had 1 turn:

Row 6

Question 5

Question 4

Question 3

Question 2

Question 1

Column 1 2 3 4 5 6 7

Nathan wants to write a program to allow two users to play the game on the computer. The program will display a simplified version of the above grid which is redrawn after every turn. To drop a token into the grid, the player enters the chosen column number.

The function ColumnNumberValid has a parameter (x) which is the chosen column number. The function returns:

  • TRUE if x is between 1 and 7 inclusive and there is still space in the column
  • FALSE otherwise

(ii)

Nathan wants to test the validation of the parameter, x, by this function.

Give three different types of test data with an example of each.

Justify your choices.

Type of test data Example test data Justification

[9]

Question 8

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Structured programming

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9691_w14_qp_22.pdf

Keep practising this topic