Cambridge AS Level Computer Science 9618 · 12.1 Program Development Life cycle

Q2 · 9618/22/M/J/22 Q1

Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 1 of 3.

Q29618/22/M/J/22original Q1Structured · 11 marks
Question 1 from 9618/22/M/J/22

Worked solution

(a)

Write the term: breakpoint [1]

(b)

Match each activity to its stage:

ActivityLife 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:

StatementError
Status ← TRUE AND FALSENO 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 IDEAKnow 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

Mark scheme for 9618/22/M/J/22 question 1
VIDEO
▶ Whole paper

Video solution of the whole paper · by Awab Aqib. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.