Past-paper question · 2021 May-June · Paper 23 · Q2(a)

Question 2(a) 2021 · May-June · Paper 23 · 5 marks

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

Official answer for Question 2

Part (a)

Question 5

✓
One mark for:

Question 1

✓
All four boxes correctly labelled and positioned

Question 2

✓
Selection diamond (only on UpdateLoan and no iteration arrows)

Question 3

✓
Parameters to and from LoanExtend()

Question 4

✓
Parameters to and from CheckReserve()

Question 5

✓
Parameters to and from LoanReturn()

Mark scheme 9618_s21_ms_23.pdf →

Show text version of question

Question 2

Part (a)

Four program modules form part of a program for a library.

A
description of the relationship between the modules is summarised as follows:

Module name Description

UpdateLoan() • Calls either LoanExtend() or LoanReturn()

  • Called with parameters LoanID and BookID
  • Calls CheckReserve() to see whether the book has been
  • LoanExtend() reserved for another library user

  • Returns TRUE if the loan has been extended, otherwise returns
  • FALSE

  • Called with BookID
  • CheckReserve() • Returns TRUE if the book has been reserved, otherwise returns FALSE

  • Called with parameters LoanID and BookID

LoanReturn() • Returns a REAL (which is the value of the fine to be paid in the case of an overdue loan)

Draw a structure chart to show the relationship between the four modules and the parameters passed between them.

[5]

Question 5

Topic relevance

Why this question appears here

82% assigned-topic match · Programming › Constructs

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_s21_qp_23.pdf

Keep practising this topic