9618/31

Computer Science 9618/31May/June 2022

Cambridge A-Level · Advanced Theory · worked solutions for every part, with the mark scheme

9
questions
75
marks
90
minutes

Topics Further Programming · Hardware and Virtual Machines · Data Representation · Communication and Internet Technologies · System Software · Computational Thinking and Problem-solving · +1 more

Q1Data RepresentationFree sample

Data types can be defined using pseudocode.

The data type, LibraryRecord, is defined in pseudocode as:

TYPE LibraryRecord
 DECLARE Title : STRING
 DECLARE Fiction : BOOLEAN
 DECLARE Author : STRING
 DECLARE NumberOfCopies : INTEGER
ENDTYPE

A variable, LibraryBook, is declared in pseudocode as:

DECLARE LibraryBook : LibraryRecord
(a)

Write pseudocode statements to assign:

  • A Level Computer Science to Title of LibraryBook
  • FALSE to Fiction of LibraryBook.

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

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

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

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

2M
(b)

The type definition for LibraryRecord is changed.

(i)

The value for NumberOfCopies must be between 1 and 10 inclusive.

Write the updated line of pseudocode from the type definition of LibraryRecord to implement the change.

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

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

1M
(ii)

Every copy of every book is now uniquely identified by an accession number, AccessionNumber, as it is added to the library. Each library record will include one or more accession numbers. Each accession number is an integer.

Write the extra line of pseudocode needed in the type definition of LibraryRecord.

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

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

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

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

2M
(c)

A record is a user-defined composite data type.

Explain what is meant by a user-defined composite data type.
Include an example of another user-defined composite data type in your answer.

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

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

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

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

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

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

3M

The rest of this paper

8 more questions
  • Q2Further Programming6M
  • Q3Communication and Internet Technologies8M
  • Q4Hardware and Virtual Machines6M
  • Q5System Software · Computational Thinking and Problem-solving12M
  • Q6Hardware and Virtual Machines6M
  • Q7Further Programming11M
  • Q8Security8M
  • Q9Further Programming10M
Loading the full paper…