Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Subject:
Topics:
Avg
score:
–
Topics
done:
0/32

The program development life cycle

Practise 30 exam-style questions on The program development life cycle for Cambridge IGCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with an AI tutor on hand if you get stuck.

  • 30 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

State the name of the stage of the program development life cycle that comes immediately after the coding stage.

Model answer

Testing

Explanation

The four stages are analysis, design, coding and testing, in that order. After the program has been coded, the testing stage checks the whole program using test data.

Mark scheme
  1. 1 mark

    Testing

Question 2

2 marks

State two purposes of the testing stage of the program development life cycle.

Model answer

To check that the completed program produces the correct results, and to check that it meets all the requirements identified in the analysis stage.

Explanation

The testing stage checks the whole program using planned test data. It confirms the program gives the right results, copes with invalid data and does what the client asked for.

Mark scheme
  1. 1 mark

    To check that the program works as expected / produces the correct results

    1 mark each, max 2

  2. 1 mark

    To check that the program meets the requirements identified in the analysis stage

  3. 1 mark

    To find errors / bugs so that they can be corrected

  4. 1 mark

    To check that the program handles invalid / unexpected data without crashing (is robust)

Question 3

3 marks

Explain the difference between the iterative testing carried out during the coding stage and the testing carried out during the testing stage of the program development life cycle.

Model answer

Iterative testing is done while the code is being written: each module is tested as soon as it is finished, errors are corrected and the module is retested until it works. The testing stage happens after coding and tests the complete program, using planned test data and comparing the actual results with the expected results to check the program meets the requirements.

Explanation

Iterative testing is small and repeated (one module at a time, during coding). Final testing is planned and covers the whole program with normal, abnormal, extreme and boundary data. Good answers describe both kinds.

Mark scheme
  1. 1 mark

    Iterative testing: each module / part is tested as it is written

    max 3; max 2 if only one kind of testing is described

  2. 1 mark

    Iterative testing: errors are corrected and the module retested, repeatedly, until it works

  3. 1 mark

    Testing stage: the whole / completed program is tested

  4. 1 mark

    Testing stage: planned test data (normal, abnormal, extreme, boundary) is used and actual results are compared with expected results

  5. 1 mark

    Testing stage: checks that the program meets the requirements

Question 4

5 marks

At the design stage, a programmer writes pseudocode for a module that works out the cost of a family's tickets to a museum. The module must:
- input the number of adults and the number of children
- calculate the cost, where an adult ticket costs £12.50 and a child ticket costs £6.00
- take 10% off the cost if the cost is more than £50.00
- output the cost.

Write the pseudocode for this module.

Model answer

CONSTANT AdultPrice ← 12.50
CONSTANT ChildPrice ← 6.00
DECLARE Adults : INTEGER
DECLARE Children : INTEGER
DECLARE Cost : REAL
INPUT Adults
INPUT Children
Cost ← Adults * AdultPrice + Children * ChildPrice
IF Cost > 50.00
  THEN
    Cost ← Cost * 0.9
ENDIF
OUTPUT "Total cost: ", Cost

Explanation

The module follows input, process, output: input both numbers, calculate the cost, apply the discount only if the condition is met, then output. Multiplying by 0.9 takes off 10%; a common error is to subtract 10 instead of 10%.

Mark scheme
  1. 1 mark

    MP1 inputs the number of adults and the number of children

  2. 1 mark

    MP2 calculates the cost as adults × 12.50 + children × 6.00

    Accept use of constants for the prices

  3. 1 mark

    MP3 checks whether the cost is greater than 50

    Do not accept >= 50

  4. 1 mark

    MP4 reduces the cost by 10% (e.g. Cost ← Cost * 0.9) only when the cost is greater than 50

    Do not accept a discount applied in every case

  5. 1 mark

    MP5 outputs the final cost after any discount

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

AI Tutor Hints first, answers after you try

Hi! Stuck? Ask me for a hint and I’ll help you work it out. Once you’ve checked your answer I can explain exactly where the marks are.