Past-paper question · 2025 May-June · Paper 23 · Q7(a)(i)

Question 7(a)(i) 2025 · May-June · Paper 23 · 5 marks

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

Official answer for Question 7

Part (a)

(i)

✓
Example solution:

Question 5

✓
PROCEDURE UpdateVisit(BYREF LastVisitDate : DATE,__
✓
BYREF LoyaltyPoints : INTEGER)
✓
IF MONTH(TODAY()) = MONTH(LastVisitDate) THEN
✓
LoyaltyPoints LoyaltyPoints + 4
✓
ELSE
✓
LoyaltyPoints LoyaltyPoints + 1
✓
ENDIF
✓
LastVisitDate TODAY()
✓
ENDPROCEDURE
✓
MP1
✓
Procedure heading and ending and two parameters of correct type
✓
MP2
✓
… both passed BYREF
✓
MP3
✓
Use of TODAY() function to obtain current date
✓
MP4
✓
Use MONTH function (2) and one parameter is the header parameter
✓
and 2nd parameter is TODAY() / assigned variable
✓
MP5
✓
If visit is same month, increase LoyaltyPoints by 4 otherwise
✓
increase by 1
✓
MP6
✓
LastVisitDate set to TODAY() / ‘current date’ variable (assigned
✓
or unassigned)

Mark scheme 9618_s25_ms_23.pdf →

Show text version of question

Question 7

Part (a)

(i)

Question 7

A program is being developed to implement a customer loyalty scheme for a coffee shop.

The programmer has decided that the following data items need to be stored for each customer:

Data item Description

customer ID a unique six-digit string

loyalty points an integer value that depends on how often the customer visits the coffee shop

last visit date the date the customer last visited the coffee shop

The programmer has defined a program module:

Module Description

  • called with two parameters:
  • 1. loyalty points of type INTEGER 2. last visit date of type DATE

  • change the loyalty points:

increase by four if the last visit date and the current date are in the UpdateVisit() same month otherwise increase by one

  • change the last visit date to the current date
  • the changed values must be available to the code that follows the call

to UpdateVisit()

(i)

Write pseudocode for module UpdateVisit()

Assume the customer has made at least one previous visit.

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

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

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

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

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

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

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

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

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

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

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

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

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

[5]

Question 15

, ,

Topic relevance

Why this question appears here

49% assigned-topic match · Programming › Structured programming

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 9618_s25_qp_23.pdf

Keep practising this topic