9618/22/M/J/22 question 1: worked solution (May/June 2022, paper 22)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 12.1 Program Development Life cycle Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 1 of 3. Q2 9618/22/M/J/22 original Q1 Structured · 11 marks Worked solution (a) Write the term: breakpoint [1] (b) Match each activity to its stage: Activity Life cycle stage An identifier table is produced. Design Syntax errors can occur. Coding The developer discusses the program requirements with the customer. Analysis A trace table is produced. Testing Design [1] Coding [1] Analysis [1] Testing [1] (c) Any two of these: The data type of the identifier [1] The purpose of the identifier (or its scope, local or global, or an example value, or the size of an array or string, or the value of a constant) [1] (d) Check each statement for a wrong data type: Statement Error Status ← TRUE AND FALSE NO ERROR IF LENGTH("Password") < "10" THEN "10" is a string; it must be an integer Code ← LCASE("Electrical") LCASE needs a CHAR, not a string Result ← IS_NUM(-27.3) IS_NUM needs a string or char, not a number TRUE AND FALSE: NO ERROR [1] "10" is a string, it must be an integer [1] LCASE parameter must be a char, not a string [1] IS_NUM parameter must be a string (or char), not a number [1] KEY IDEA Know the life cycle stages and their products, and check the data types that built-in functions and comparisons need. TOTAL 11 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Awab Aqib. Tap the picture to open it on YouTube.