A LEVEL UNIT 3 AND 4 - SPECIMEN ASSESSMENT
MATERIALS REVISION MATERIAL UPDATED
, lOMoARcPSD|29700879
A LEVEL COMPUTER SCIENCE
COMPONENT 1
Programming and System Development
SPECIMEN PAPER
2 hours 45 minutes
ADDITIONAL MATERIALS
In addition to this examination paper, you will need a 16 page answer book.
INSTRUCTIONS TO CANDIDATES
Answer all questions.
Write your answers in the separate answer book provided.
INFORMATION FOR CANDIDATES
The number of marks is given in brackets at the end of each question or part-question; you
are advised to divide your time accordingly.
The total number of marks is 100.
You are reminded of the need for good English and orderly, clear presentation in your
answers.
No certificate will be awarded to a candidate detected in any unfair practice during the
examination.
, lOMoARcPSD|29700879
Answer all questions
1. A binary tree can be constructed using the following rules:
Rule 1. The first item becomes the root node;
Rule 2. Items earlier or at the same position in the alphabet follow the left pointer;
Rule 3. Items later in the alphabet follow the right pointer.
(a) Draw a representation of a dynamic binary tree with pointers using the
following data:
Newport, Canterbury, Oswestry, Warrington, Rugby, Bath, Derby [2]
(b) Show how the above tree could be represented using a two dimensional array.
[3]
(c) Make the following amendments to the tree represented as a two dimensional
array:
(i) Insert Newquay into the tree; [3]
(ii) Delete Warrington from the tree. [1]
(d) Give one advantage and one disadvantage of using a binary tree to store data
compared with a linked list. [2]
(e) Giving examples, compare a balanced and an un-balanced binary tree and
evaluate their effectiveness to solve problems by comparing the maximum
number of comparisons to locate an item in each of these trees. [4]
2. In the programming industry, professional Codes of Conduct are used extensively
and they set rules that should be followed by programmers.
State five reasons why programmers are required to follow rules under a professional
Code of Conduct. Each reason must relate to a specific rule. [5]
, lOMoARcPSD|29700879
A LEVEL COMPUTER SCIENCE Specimen Assessment Materials 7
3. Below is a segment of code from a high level language.
Total = Total + NumInput;
print(Total);
Count = Count + 1;
print(Count);
Give an example of a reserved word table used by a compiler and construct a user
identifier table that could be used by a compiler to translate the segment of code
above into a stream of Hex tokens. [4]
Use the tables to translate the following line of code into a stream of Hex tokens
Total = Total + NumInput [1]
4. (a) Clearly showing each step, simplify the following Boolean expression using De
Morgan's Laws and Boolean identities:
A.B +A [3]
(b) Clearly showing each step, simplify the following Boolean expression:
A+B.(A+B)+A.(Ā+B) [5]