Past-paper question · 2012 October-November · Paper 23 · Q8(b)

Question 8(b) 2012 · October-November · Paper 23 · 25 marks

Original past-paper question for 8(B)
Original past-paper question for 8(B)
Original past-paper question for 8(B)
Original past-paper question for 8(B)
Original past-paper question for 8(B)
Original past-paper question for 8(B)
Reveal official mark-scheme answer

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9691_w12_ms_23.pdf →

Show text version of question

Question 8

Part (b)

Question 8

[10]

Question 5

(ii)

Explain why 487BK is an invalid bike registration. For

Examiner's Use

State the line number of your code in part (e)(i) which detects that it is invalid.

Line Number

[2]

Part (f)

The code in part (e)(i) will be subject to black box testing and white box testing.

Explain how this testing will be carried out.

(i)

Black box testing

[3]

(ii)

White box testing

[3]

Question 6

2 Super Bikes owns a rectangular parking area with 30 rows; each row has 4 bike spaces. For Each bike is always parked in the same space. Examiner's Use The array BikeSpace[30,4] stores the bike registrations. Soni uses a flowchart to help him design a module to populate the array with the bike registrations. Input is terminated using the rogue value “BK000”.

Row ← 1

No Row <= 30? To rest of program

Yes

Position ← 1

No Position <= 4?

Yes

Input BikeReg

No BikeReg <> “BK000”? To rest of program

Yes

BikeSpace[Row, Position] ← BikeReg

Position ← Position + 1

Row ← Row + 1

Question 7

Part (b)

From the flowchart write the module code, using nested REPEAT…UNTIL loops. For

Ensure that your code demonstrates good programming practice. Examiner's Use

Row ← 1

No Row <= 30? To rest of program

Yes

Position ← 1

No Position <= 4?

Yes

Input BikeReg

No BikeReg <> “BK000”? To rest of program

Yes

BikeSpace[Row, Position] ← BikeReg

Position ← Position + 1

Row ← Row + 1

Question 9

Programming language used For Examiner's Use Code

[7]

Question 10

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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_w12_qp_23.pdf

Keep practising this topic