Question 4(a) 2015 · May-June · Paper 22 · 13 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 4
Part (a)
Question 4
Terminates the program Ends
Complete the pseudocode for the design in part (b), shown again below, to respond to each menu choice.
CONSTANT i 3 CALL DisplayMenu NoOfAttempts 0 REPEAT OUTPUT "Enter choice (1..4)" INPUT Choice NoOfAttempts NoOfAttempts + 1 UNTIL (Choice >= 1 AND Choice <= 4) OR NoOfAttempts = i
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
Question 7
Part (d)
The algorithm in part
Part (c)
is to be amended. The program will:
- repeatedly display the menu and respond to the user’s choice
- terminate when the user enters 4
Write program code for this final design which will be made up of:
- the main program
- procedure ReadFile
- procedure DisplayMenu
Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type.
Programming language ............................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[8]
Question 8
3 When the guarantee on a computer runs out, the owner can take out insurance to cover breakdown and repairs.
The price of the insurance is calculated from:
- the model of the computer
- the age of the computer
- the current insurance rates
Following an enquiry to the insurance company, the customer receives a quotation letter with the price of the insurance.
The structure chart below shows the modular design for this process:
....................................
...................... ......................
......... ...................... ...................... ......................
...................... ................. ......................
......................
.................................... .................................... Premium rates
Premium rates
access premium rates database ....................................
Question 9
Part (a)
Using the letters A to D, add the labelling to the chart boxes on the opposite page.
Modules
Why this question appears here
82% assigned-topic match · Programming › Programming basics
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_s15_qp_22.pdf
