Past-paper question · 2024 May-June · Paper 22 · Q4(a)

Question 4(a) 2024 · May-June · Paper 22 · 6 marks

Original past-paper question for 4(A)
Original past-paper question for 4(A)
Reveal official mark-scheme answer Official mark-scheme answer for 4(A)

Official answer for Question 4

Part (a)

✓
One mark per mark point

Question 6

✓
MP1
✓
length check …
✓
MP2
✓
… to ensure the product code entered is 6 characters in length
✓
MP3
✓
format check …
✓
MP4
✓
… to ensure the first two characters of the product code entered are “PD”
✓
MP5
✓
range check …
✓
MP6
✓
… to ensure that the value of the last four figures of the product code entered is between 1000 and 9999

Mark scheme 0478_s24_ms_22.pdf →

Show text version of question

Question 4

Part (a)

Question 4

A program needs to make sure the characters input for a product code meet these rules:

  • The product code is six characters in length.
  • The first two characters must be “PD”.
  • The last four characters must be a number in the range 1000 to 9999 inclusive.

Part (a)

Identify three validation checks and state how each check would make sure the product code

met one of these rules.

Check 1 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Check 2 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Check 3 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

[6]
Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_s24_qp_22.pdf

Keep practising this topic