Computer Science (AS & A Level) · May / June 2024 · Paper 23 · Question 6
9618
As printed in the paper
The question as text
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 Step Image filename Image 1 2 3 < 10 >= 10 and < 20 >= 80 and < 90 >= 90 and < 100 100 >= 20 and < 30 9 10 11 Percentage progress BargraphA-1.bmp BargraphA-2.bmp BargraphA-3.bmp BargraphA-9.bmp BargraphA-10.bmp 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.
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
6(a)[6]
6(b)(i)[2]
6(b)(ii)[1]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

