Past-paper question · 2024 May-June · Paper 23 · Q6(b)(i)

Question 6(b)(i) 2024 · May-June · Paper 23 · 2 marks

Original past-paper question for 6(B)(I)
Original past-paper question for 6(B)(I)
Original past-paper question for 6(B)(I)
Original past-paper question for 6(B)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 6(B)(I)

Official answer for Question 6

Part (b)

(i)

✓
Example answer:

Question 2

✓
FUNCTION Progress2(Percent, Steps : INTEGER, Root :
✓
STRING) RETURNS STRING
✓
One mark for each:
✓
Keyword FUNCTION Progress2 and three parameters of correct type
✓
Keyword RETURNS and type string

Mark scheme 9618_s24_ms_23.pdf →

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

A
procedure Progress() will:
  • be called with two parameters:
  • ○ an integer representing the percentage progress (0 to 100 inclusive) ○ a string representing the image filename root

  • generate the full image filename
  • call a procedure Display() using the full image filename as the parameter.

Question 13

, , The definition of procedure Progress() is provided here for reference:

A
procedure Progress() will:
  • be called with two parameters:
  • ○ an integer representing the percentage progress (0 to 100 inclusive) ○ a string representing the image filename root

  • generate the full image filename
  • call a procedure Display() using the full image filename as the parameter.

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.

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

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

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

[2]
Topic relevance

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

Keep practising this topic