Past-paper question · 2019 October-November · Paper 22 · Q4(c)(ii)

Question 4(c)(ii) 2019 · October-November · Paper 22 · 3 marks

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

Official answer for Question 4

Part (c)

(ii)

✓
One mark per bullet point:

Question 3

✓
•
✓
Tests carried out before all the modules / subroutines have been written
✓
•
✓
Simple / dummy module written to simulate / model / replace the actual
✓
module / subroutine / object
✓
•
✓
Contains an output statement // returns a fixed value to indicate that the call
✓
has been made
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w19_ms_22.pdf →

Show text version of question

Question 4

Part (c)

(ii)

Question 4

A program is being written to control the operation of a portable music player. One part of the

program controls the output volume.

The player has two buttons, one to increase the volume and one to decrease it. Whenever a button is pressed, a procedure Button() is called with a parameter value representing the button as follows:

Button Parameter value

Volume increase 10

Volume decrease 20

For example, pressing the volume increase button three times followed by pressing the volume decrease button once would result in the calls:

CALL Button(10) // VolLevel increased by 1 CALL Button(10) // VolLevel increased by 1 CALL Button(10) // VolLevel increased by 1 CALL Button(20) // VolLevel decreased by 1

The program makes use of two global variables of type INTEGER as follows:

Variable Description VolLevel The current volume setting. This must be in the range 0 to 49.

A
value that can be set to limit the maximum value of VolLevel,

in order to protect the user’s hearing. MaxVol

A
value in the range 1 to 49 indicates the volume limit.
A
value of zero indicates that no volume limit has been set.

The procedure Button() will modify the value of VolLevel depending on which button has been pressed and whether a maximum value has been set.

Question 9

The testing stage is part of the program development cycle.

(ii)

Stub testing is a technique often used in the development of modular programs.

Describe the technique.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.....................................................................................................................................

[3]

Question 12

Topic relevance

Why this question appears here

82% 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 9608_w19_qp_22.pdf

Keep practising this topic