Computer Science 9618/31 — May/June 2022
Cambridge A-Level · Advanced Theory · worked solutions for every part, with the mark scheme
Topics Further Programming · Hardware and Virtual Machines · Data Representation · Communication and Internet Technologies · System Software · Computational Thinking and Problem-solving · +1 more
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
Write pseudocode statements to assign:
- A Level Computer Science to
TitleofLibraryBook FALSEtoFictionofLibraryBook.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
The type definition for LibraryRecord is changed.
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.
...........................................................................................................................................
.....................................................................................................................................
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.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
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.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
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