Question 6(b)(i) 2024 · May-June · Paper 23 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
(i)
Question 2
Show text version of question
Question 6
Part (b)
(i)
Question 6
A program displays a progress bar to inform the user of the progress of tasks that take a significant
time to complete, such as those involving file transfer operations.
Task progress is divided into 11 steps. Each step represents the amount of progress as a percentage. An image is associated with each step and each image is stored in a different file.
Different progress bar images may be selected. For a given image, files all have the same filename root, with a different suffix.
The table illustrates the process for using the image with filename root BargraphA
Percentage Step Image filename Image progress 1 < 10 BargraphA-1.bmp 2 >= 10 and < 20 BargraphA-2.bmp 3 >= 20 and < 30 BargraphA-3.bmp
9 >= 80 and < 90 BargraphA-9.bmp
10 >= 90 and < 100 BargraphA-10.bmp 11 100 BargraphA-11.bmp
- be called with two parameters:
- generate the full image filename
- call a procedure Display() using the full image filename as the parameter.
○ an integer representing the percentage progress (0 to 100 inclusive) ○ a string representing the image filename root
Question 13
, , The definition of procedure Progress() is provided here for reference:
- be called with two parameters:
- generate the full image filename
- call a procedure Display() using the full image filename as the parameter.
○ an integer representing the percentage progress (0 to 100 inclusive) ○ a string representing the image filename root
Progress() will be rewritten and a new module Progress2() produced with these requirements:
- an additional parameter of type integer will specify the total number of steps
- the image filename will be returned (procedure Display() will not be called from within
Progress2()).
(i)
Write pseudocode for the new module header.
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
Why this question appears here
75% 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 9618_s24_qp_23.pdf
