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

Q7 · 9618/23/O/N/24 Q5

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

Q79618/23/O/N/24original Q5Structured · 7 marks
Question 5 from 9618/23/O/N/24

Worked solution

(a)

Match each activity to its stage:

ActivityStage
A compiler is used.Coding
A program that has been released for general use is modified.Maintenance
The dry run method is used.Testing
The program structure is specified.Design

Coding [1]

Maintenance [1]

Testing [1]

Design [1]

(b)

Write the method and say how it works:

Method: stub testing [1]

Replace Test_A() and Test_B() with simple dummy modules (stubs) [1]

Each stub returns a known value, or displays a message to show it was called, so the main program can go on being tested [1]

KEY IDEAA stub is a simple stand-in for a module that is not ready, so testing can continue.
TOTAL 7 marks

Official mark scheme

Mark scheme for 9618/23/O/N/24 question 5
VIDEO
▶ Starts at Q5 (1:06:00)

Starts at Q5 (1:06:00) · by Zafar Ali Khan (ZAK). 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.