May/June 2026 Paper 22

2026 · 6 questions · 26 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong26Unattempted
Filters0 active
1(a)(i)Data Types Variables Input OutputEasy1 mark
A program is being developed to control a simple alarm system to be used in a house. The alarm has a control panel with a keypad and a screen to display text.
The keypad consists of 36 character keys:
  • 26 upper-case letter keys, allowing A to Z to be entered
  • 10 digit keys, allowing 0 to 9 to be entered.
When the alarm system is initially installed, a password must be created. When the password is initially entered, it is checked to ensure that it follows a set of validation rules. It is then permanently stored in the alarm system.
For a password to be valid it must follow these validation rules:
  • Rule 1: contain between six and eight characters inclusive.
  • Rule 2: contain at least one letter and one digit.
  • Rule 3: each character can only occur once.
The global variable Pass is used to store the password entered.
Complete the pseudocode to declare the variable to be used to hold the password.
pseudocode
DECLARE Pass : ____
1(a)(ii)String HandlingMedium2 marks
Complete the pseudocode to check that a password contains between six and eight characters inclusive (rule 1).
pseudocode
IF ____ (Pass) < 6 OR ____ (Pass) > ____ THEN   OUTPUT "Error"   OUTPUT "The password has to contain between 6 and 8 characters."ENDIF
Function used in both conditions (it is the same function both times)
Upper boundary value
1(a)(iii)String HandlingHard7 marks
Complete the pseudocode to check that a password entered contains at least one letter and one digit character (rule 2).
pseudocode
DECLARE Index : INTEGERDECLARE Character : CHARDECLARE LetterFlag, DigitFlag : ____DigitFlag ← FALSELetterFlag ← ____FOR Index ← 1 TO ____ (Pass)   Character ← ____ (Pass, ____ , ____)   IF ____ (Character) = TRUE THEN      DigitFlag ← ____   ELSE      LetterFlag ← ____   ENDIFNEXT IndexIF ____ (LetterFlag AND DigitFlag) THEN   OUTPUT "Error"   OUTPUT "Password needs at least one letter and one digit."ENDIF
0 words
Value assigned to DigitFlag (IF branch) and to LetterFlag (ELSE branch)
1(b)(i)Program Design DocumentationEasy2 marks
A state-transition diagram is being created as part of the design process for the module, which will control the alarm system once it has been successfully installed. Two of the states already identified are that the alarm is in:
  • standby mode
  • on mode (alarm system is active).
Identify two other states that should be part of the state-transition diagram.

Answer

0 words
1(b)(ii)Program Design DocumentationEasy3 marks
Two events that will cause a change of state are:
  • entering the password when the alarm system is in standby mode
  • entering the password when the alarm system is in on mode.
Identify three other events that would cause a change of state in the state-transition diagram for the alarm system.

Answer

0 words
1(c)Testing DebuggingMedium3 marks
The validation rules from 1(a) are given again:
  • Rule 1: contain between six and eight characters inclusive.
  • Rule 2: contain at least one letter and one digit.
  • Rule 3: each character can only occur once.
Complete the table with test data that could be used to test the validation rules. Each example of test data given must:
  • be invalid for the specific rule being tested
  • be valid for the other two rules not being tested
  • test a different aspect of the rule being tested.
Two of the tests have been completed for you:
Given examples
rule being testedexample of test datareason for invalid test data
rule 11Apassword is too short
rule 3PASSWRD2letters are repeated
Rule 1: a different example of test data, with its reason
0 words
Rule 2: two examples of test data, each with its reason
0 words
Rule 3: two more examples of test data, each with its reason
0 words
1(d)Program Design DocumentationEasy3 marks
Five outcomes that could be produced at the design stage in the program development lifecycle include:
  • state-transition diagrams
  • pseudocode
  • test strategy
  • test plan
  • structured English.
Identify three other outcomes that could be produced at the design stage.

Answer

0 words
1(e)Software Development Life CycleEasy2 marks
The design and testing stages are two of the stages in the program development lifecycle used when developing the program to control the alarm system.
Identify two other stages in the program development lifecycle.

Answer

0 words
1(f)(i)Software Testing Quality AssuranceEasy1 mark
All the individual modules for the alarm system have now been written, tested and debugged as necessary. All these modules are combined to form the program, and further testing is now needed.
Identify this method of testing.
1(f)(ii)Software Testing Quality AssuranceMedium3 marks
One of the modules does not work as expected when added to the program.
Identify and describe a testing method that can be used to address this problem, so that the program can continue to be tested.
Method and description
0 words