Question 1
Question
In the question paper above.
Mark scheme
1(a)(i) STRING 1 1(a)(ii) IF LENGTH(Pass) < 6 OR LENGTH(Pass) > 8 / >= 9 2 THEN Mark as follows: 1 Mark: Use of LENGTH function twice 1 Mark: Number 8 used in second condition 1(a)(iii) Mark as follows: 7 1 DECLARE LetterFlag, DigitFlag: BOOLEAN 1 mark for BOOLEAN 2 LetterFlag ← FALSE 1 mark for FALSE 3 FOR Index ← 1 TO LENGTH(Pass) 1 mark for LENGTH 4 Character ← MID(Pass, Index, 1) 1 mark for MID, Index and 1 5 IF IS_NUM(Character) = TRUE THEN 1 mark for IS_NUM 6 DigitFlag ← TRUE ELSE LetterFlag ← TRUE 1 mark for both variables being set to TRUE 7 IF NOT(LetterFlag AND DigitFlag) THEN 1 mark for NOT 1(b)(i) One mark per state 2 Example answers: 1 Sensor activated (mode) / / Intruder/movement detected (mode) // Alert Mode 2 Alarm sounding // Light flashing (mode) // Alarm activated 3 Error mode // Power loss detected (mode) // Battery too low mode 4 Tamper detected (mode) // Lockdown (mode) 5 Disarm Mode // Maintenance Mode // Password Change Mode // Service Mode Max 2 Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(b)(ii) One mark per event 3 Do not accept repeating Example answers: examples in stem. 1 Movement / pressure (detected) Reject Turning 2 Window opened / broken (detected) system on. Reject 3 Door open (detected) reference to 4 Entering wrong password (repeatedly) creating password. 5 Entering password to enter / exit maintenance mode / silence alarm 6 Tampering / damaging alarm (system) 7 Time delay // Time passed after alarm triggered / before alarm activated 8 Battery charge too low 9 Pressing panic button Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(c) Example Solution 3 Do not accept once if lower-case letters or rule being example of test reason for invalid test characters that are tested data data not letters or digits rule 1 1A password is too short used. rule 1 PHRASE345678 Password too long rule 2 ABCDEF Does not contain a digit rule 2 1234567 Does not contain a letter rule 3 PASSWRD2 letters are repeated rule 3 ABCDEF11 Digits / Numbers are repeated rule 3 AAA111 Both digits and letters are repeated Accept Characters repeated Mark as follows: Rule 1 test: 1 mark for one example of test data for rule 1 and appropriate reason Test data A string of more than 8 characters that contains both letters and digits. Reject if test data breaks Rule 2 The letters must be upper case or/and Rule 3 Each character only occurs once Reason Password is too long Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(c) Rule 2 test (1 mark): 1 mark for two examples of test data that only breaks rule 2 and appropriate reasons. Test data A string between 6 and 8 characters long Reject if letters that contains no digits repeated Reason Does not contain a digit Test data A string between 6 and 8 characters long that contains no letters Reason Does not contain a letter Reject if digits repeated Rule 3: 1 mark for two examples of test data for rule 3 and appropriate Reject characters reasons repeated Test data A string between 6 and 8 characters long where only digits are repeated Reason Digits are repeated Test data A string between 6 and 8 characters long where both characters and digits are Reject if letters repeated repeated Reject if no letters Reason Both digits and letters are repeated 1(d) One mark per example 3 Example answers: 1 Structure chart // Problem / Program broken into modules // Reject Modular Diagram ‘Decomposition’ by itself 2 Flowchart Reject Module 3 Data Flow Diagram Overview by itself 4 Identifier / Variable table // Data structure / Record structure (designs) 5 File structure // Database Design 6 E-R Diagram 7 HCI Design // Report Design 8 Class Diagram // UML Diagram 9 Programming language to use Max 3 Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(e) One mark per stage 2 1 Analysis 2 Coding // Implementation NE Development / Programming 3 Maintenance Max 2 marks 1(f)(i) Integration 1 1(f)(ii) One mark for the name, one for the description 3 Method: Stub (testing) Description: 1 A simple / dummy module is written to replace the module Do not mark (that is not working) description if 2 The simple / dummy module will return an expected value / method incorrect will output a message (to show the module has been called)