Skip to main content
A-LevelComputer ScienceSoftware development9618/23 · May/June 2021 · Q213 Marks

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() LoanExtend() | • Called with parameters LoanID and BookID | • Calls CheckReserve() to see whether the book has been reserved for another library user | • Returns TRUE if the loan has been extended, otherwise returns FALSE CheckReserve() | • Called with BookID | • Returns TRUE if the book has been reserved, otherwise returns FALSE LoanReturn() | • Called with parameters LoanID and BookID | • Returns a REAL (which is the value of the fine to be paid in the case of an overdue loan)

  1. (a)Draw a structure chart to show the relationship between the four modules and the parameters passed between them.[5]
  2. (b)The definition for module LoanReturn() is amended as follows: Module name | Description --- | --- LoanReturn() | Called with parameters LoanID, BookID and Fine | The module code checks whether the book has been returned on time | and then assigns a new value to Fine • LoanID and BookID are of type STRING • Fine is of type REAL Write the pseudocode header for the amended module LoanReturn().[2]
  3. (c)A program will: • input 50 unique integer values • output the largest value • output the average of the values excluding the largest value. Draw a program flowchart to represent the algorithm. Variable declarations are not required. It is not necessary to check that each input value is unique.[6]

Mark scheme

Marking points from the official mark scheme (May/June 2021). The mark or mark type is shown in brackets.

  1. [1] All four boxes correctly labelled and positioned
  2. [1] Selection diamond (only on UpdateLoan and no iteration arrows)
  3. [1] Parameters to and from LoanExtend()
  4. [1] Parameters to and from CheckReserve()
  5. [1] Parameters to and from LoanReturn()
  6. [1] PROCEDURE LoanReturn
  7. [1] (LoanID, BookID : STRING,
  8. [1] BYREF Fine : REAL)
  9. [1] Initialise MAX to first value input
  10. [1] Set Total to zero
  11. [1] Input 49 more values (or 50 values in total)
  12. [1] Sum all values input
  13. [1] Set new MAX when Input value > MAX in a loop
  14. [1] Sum all but largest (or subtract MAX from total), calculate and output average

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Software development, A-Level Computer Science (syllabus 9618). Structured question, 13 marks.
Source
A-Level Computer Science, May/June 2021 Paper 2 Variant 3, question 2.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep