0% found this document useful (0 votes)
25 views

Practice Paper Set 2 Algorithms Programming Mark Scheme

Uploaded by

BXR Studios
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Practice Paper Set 2 Algorithms Programming Mark Scheme

Uploaded by

BXR Studios
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Practice Paper 2

GCE Computer Science


H446/02 Algorithms and Programming

Duration 2 hours 30 minutes

MAXIMUM MARK 140

FINAL

This document consists of 27 pages


H446/02 Mark Scheme Practice paper 2

MARKING INSTRUCTIONS

PREPARATION FOR MARKING

SCORIS

1. Make sure that you have accessed and completed the relevant training packages for on-screen marking: scoris assessor Online Training; OCR
Essential Guide to Marking.

2. Make sure that you have read and understood the mark scheme and the question paper for this unit. These are posted on the RM Cambridge
Assessment Support Portal http://www.rm.com/support/ca

3. Log-in to scoris and mark the required number of practice responses (“scripts”) and the required number of standardisation responses.

YOU MUST MARK 10 PRACTICE AND 10 STANDARDISATION RESPONSES BEFORE YOU CAN BE APPROVED TO MARK LIVE SCRIPTS.

TRADITIONAL
Before the Standardisation meeting you must mark at least 10 scripts from several centres. For this preliminary marking you should use pencil and
follow the mark scheme. Bring these marked scripts to the meeting.

MARKING

1. Mark strictly to the mark scheme.

2. Marks awarded must relate directly to the marking criteria.

3. The schedule of dates is very important. It is essential that you meet the scoris 50% and 100% (traditional 50% Batch 1 and 100% Batch 2)
deadlines. If you experience problems, you must contact your Team Leader (Supervisor) without delay.

4. If you are in any doubt about applying the mark scheme, consult your Team Leader by telephone, email or via the scoris messaging system.

2
H446/02 Mark Scheme Practice Paper 2

5. Work crossed out:


a. where a candidate crosses out an answer and provides an alternative response, the crossed out response is not marked and gains no
marks
b. if a candidate crosses out an answer to a whole question and makes no second attempt, and if the inclusion of the answer does not
cause a rubric infringement, the assessor should attempt to mark the crossed out answer and award marks appropriately.

6. Always check the pages (and additional objects if present) at the end of the response in case any answers have been continued there. If the
candidate has continued an answer there then add a tick to confirm that the work has been seen.

7. There is a NR (No Response) option. Award NR (No Response)


- if there is nothing written at all in the answer space
- OR if there is a comment which does not in any way relate to the question (e.g. ‘can’t do’, ‘don’t know’)
- OR if there is a mark (e.g. a dash, a question mark) which isn’t an attempt at the question.
Note: Award 0 marks – for an attempt that earns no credit (including copying out the question).

8. The scoris comments box is used by your Team Leader to explain the marking of the practice responses. Please refer to these comments when
checking your practice responses. Do not use the comments box for any other reason.
If you have any questions or comments for your Team Leader, use telephone, email or the scoris messaging system.

9. Assistant Examiners will send a brief report on the performance of candidates to their Team Leader (Supervisor) via email by the end of the
marking period. The report should contain notes on particular strengths displayed as well as common errors or weaknesses. Constructive criticism
of the question paper/mark scheme is also appreciated.

10. For answers marked by levels of response:


a. To determine the level – start at the highest level and work down until you reach the level that matches the answer
b. To determine the mark within the level, consider the following:

3
H446/02 Mark Scheme Practice paper 2

Descriptor Award mark


On the borderline of this level and the one below At bottom of level
Just enough achievement on balance for this level Above bottom and either below middle or at middle of level (depending
on number of marks available)
Meets the criteria but with some slight inconsistency Above middle and either below top of level or at middle of level
(depending on number of marks available)
Consistently meets the criteria for this level At top of level

11. Annotations

Annotation Meaning
Omission mark

Benefit of the doubt

Subordinate clause / consequential error

Incorrect point

Expansion of a point

Follow through

Not answered question

No benefit of doubt given

Point being made

Repeat

Correct point

Too vague

Zero (big)

4
H446/02 Mark Scheme Practice Paper 2

Blank Page – this annotation must be used on all blank pages within an answer booklet (structured or unstructured) and on
each page of an additional object where there is no candidate response.
Level 1

Level 2

Level 3

5
H446/02 Mark Scheme Practice paper 2

12. Subject-specific Marking Instructions

INTRODUCTION

Your first task as an Examiner is to become thoroughly familiar with the material on which the examination depends. This material includes:
• the specification, especially the assessment objectives
• the question paper and its rubrics
• the mark scheme.

You should ensure that you have copies of these materials.

You should ensure also that you are familiar with the administrative procedures related to the marking process. These are set out in the OCR
booklet Instructions for Examiners. If you are examining for the first time, please read carefully Appendix 5 Introduction to Script Marking:
Notes for New Examiners.

Please ask for help or guidance whenever you need it. Your first point of contact is your Team Leader.

6
H446/02 Mark Scheme Practice Paper 2

USING THE MARK SCHEME

Please study this Mark Scheme carefully. The Mark Scheme is an integral part of the process that begins with the setting of the question paper and
ends with the awarding of grades. Question papers and Mark Schemes are developed in association with each other so that issues of
differentiation and positive achievement can be addressed from the very start.

This Mark Scheme is a working document; it is not exhaustive; it does not provide ‘correct’ answers. The Mark Scheme can only provide ‘best
guesses’ about how the question will work out, and it is subject to revision after we have looked at a wide range of scripts.

The Examiners’ Standardisation Meeting will ensure that the Mark Scheme covers the range of candidates’ responses to the questions, and that all
Examiners understand and apply the Mark Scheme in the same way. The Mark Scheme will be discussed and amended at the meeting, and
administrative procedures will be confirmed. Co-ordination scripts will be issued at the meeting to exemplify aspects of candidates’ responses and
achievements; the co-ordination scripts then become part of this Mark Scheme.

Before the Standardisation Meeting, you should read and mark in pencil a number of scripts, in order to gain an impression of the range of
responses and achievement that may be expected.

In your marking, you will encounter valid responses which are not covered by the Mark Scheme: these responses must be credited. You will
encounter answers which fall outside the ‘target range’ of Bands for the paper which you are marking. Please mark these answers according to the
marking criteria.

Please read carefully all the scripts in your allocation and make every effort to look positively for achievement throughout the ability range. Always
be prepared to use the full range of marks.

7
H446/02 Mark Scheme Practice paper 2

LEVELS OF RESPONSE QUESTIONS:

The indicative content indicates the expected parameters for candidates’ answers, but be prepared to recognise and credit unexpected approaches
where they show relevance.
Using ‘best-fit’, decide first which set of BAND DESCRIPTORS best describes the overall quality of the answer. Once the band is located, adjust
the mark concentrating on features of the answer which make it stronger or weaker following the guidelines for refinement.

• Highest mark: If clear evidence of all the qualities in the band descriptors is shown, the HIGHEST Mark should be awarded.
• Lowest mark: If the answer shows the candidate to be borderline (i.e. they have achieved all the qualities of the bands below and show
limited evidence of meeting the criteria of the band in question) the LOWEST mark should be awarded.
• Middle mark: This mark should be used for candidates who are secure in the band. They are not ‘borderline’ but they have only achieved
some of the qualities in the band descriptors.

Be prepared to use the full range of marks. Do not reserve (e.g.) high Band 3 marks ‘in case’ something turns up of a quality you have not yet seen.
If an answer gives clear evidence of the qualities described in the band descriptors, reward appropriately.

8
H446/02 Mark Scheme Practice Paper 2

AO1 AO2 AO3


High (thorough) Precision in the use of question Knowledge and understanding Concerted effort is made to
terminology. Knowledge shown is shown is consistently applied to consider all aspects of a system /
consistent and well-developed. context enabling a logical and problem or weigh up both sides to
Clear appreciation of the question sustained argument to develop. an argument before forming an
from a range of different Examples used enhance rather overall conclusion. Judgements
perspectives making extensive use than detract from response. made are based on appropriate
of acquired knowledge and and concise arguments that have
understanding. been developed in response
resulting in them being both
supported and realistic.
Middle (reasonable) Awareness of the meaning of the Knowledge and understanding There is a reasonable attempt to
terms in the question. Knowledge applied to context. Whilst clear reach a conclusion considering
is sound and effectively evidence that an argument builds aspects of a system / problem or
demonstrated. Demands of and develops through response weighing up both sides of an
question understood although at there are times when opportunities argument. However the impact of
times opportunities to make use of are missed to use an example or the conclusion is often lessened by
acquired knowledge and relate an aspect of knowledge or a lack of supported judgements
understanding not always taken. understanding to the context which accompany it. This inability
provided. to build on and develop lines of
argument as developed in the
response can detract from the
overall quality of the response.
Low (basic) Confusion and inability to Inability to apply knowledge and Little or no attempt to prioritise or
deconstruct terminology as used in understanding in any sustained weigh up factors during course of
the question. Knowledge partial way to context resulting in tenuous answer. Conclusion is often
and superficial. Focus on question and unsupported statements being dislocated from response and any
narrow and often one-dimensional. made. Examples if used are for the judgements lack substance due in
most part irrelevant and part to the basic level of argument
unsubstantiated. that has been demonstrated
throughout response.

9
H446/02 Mark Scheme Practice paper 2

Assessment Objective
AO1 Demonstrate knowledge and understanding of the principles and concepts of computer science, including abstraction, logic, algorithms and data
representation.

AO1.1 Demonstrate knowledge of the principles and concepts of abstraction, logic, algorithms, data representation or other as appropriate.

AO1.2 Demonstrate understanding of the principles and concepts of abstraction, logic, algorithms, data representation or other as appropriate.

AO2 Apply knowledge and understanding of the principles and concepts of computer science including to analyse problems in computational terms.

AO2.1 Apply knowledge and understanding of the principles and concepts of computer science.

AO2.2 Analyse problems in computational terms.

AO3 Design, program and evaluate computer systems that solve problems, making reasoned judgements about these and presenting conclusions.

AO3.1 Design computer systems that solve problems.

AO3.2 Program computer systems that solve problems.

AO3.3 Evaluate computer systems that solve problems, making reasoned judgements about these and presenting conclusions.

10
H446/02 Mark Scheme Practice Paper 2

Question Answer Marks Guidance


1 a i 1 mark per bullet to max 3 3
• A data structure AO1.1
• Consists of nodes (3)
• That have sub nodes (children)
• First node is called the root
• Lines that join nodes are called branches
1 a ii 1 mark per bullet to Max 1 1
• In a binary search tree, each node only has max. 2 sub nodes AO1.2
• If a child node is less than a parent node, it goes to the left of the (1)
parent.
• If a child node is greater than a parent node, it goes to the right of the
parent.
1 b 4 Allow follow through e.g. if white is
1 mark for each node as a correct sub-node AO2.1 incorrect, but orange follows through in
(4) a logical position.

11
H446/02 Mark Scheme Practice paper 2

Question Answer Marks Guidance

1 c i 2 marks for correct order 5


• 5, 31, 20, 48, 45, 60 AO1.1
• 92, 88, 98, 76, 50 (1)
AO1.2
1 mark per bullet to max 3 for explanation (2)
• Visit all nodes to the left of the root node AO2.1
• Visit right (2)
• Visit root node
• Repeat three points for each node visited
1 c ii 2 marks for correct order 5
• 50, 45, 76 AO1.1
• 20, 48, 60, 98, 5, 31, 88, 92 (1)
AO1.2
1 mark per bullet to max 3 for explanation (2)
• Visit root node AO2.1
• Visit all direct subnodes (children) (2)
• Visit all subnodes of first subnode
• Repeat three points for each subnode visited
1 d i 1 mark for the correct pointers for nodes 1, 2 and 3 3 Ignore any change to FP, additional
AO2.1 nodes and Right Pointers to node 4 and
(3) 5

12
H446/02 Mark Scheme Practice Paper 2

Question Answer Marks Guidance


Array Left Right
Data
Index Pointer Pointer
0 1 68 2
1 3 30
2 6 73 5
3 4 22
4 1
5 90
6 70

13
H446/02 Mark Scheme Practice paper 2

1 d ii To identify where the next element will be placed 1


AO1.2 (1)
1 d iii 1 mark per bullet 4 Allow follow through for errors from 1di
• Adding data 6 and 100 AO2.1 (4)
• …In the correct order
• Updating the Right Pointers of nodes 4 and 5
• Updating the Free Pointer to 9
Array Left Right
Data
Index Pointer Pointer
0 1 68 2
1 3 30
2 6 73 5
3 4 22
4 1 7
FP: 9 5 90 8
6 70
7 6
8 100
2 a 1 mark per bullet 2
• Weighted/Undirected AO1.2 (2)
• Graph
2 b i E.g. Weighting/cost based on estimated distance from final node 1
AO2.1
2 b ii Used to speed up process of finding solution 1
AO1.1

14
H446/02 Mark Scheme Practice Paper 2

2 b iii 1 mark per bullet, max 7 for calculations/explanation, max 1 for correct final path 8
AO1.2
• Visiting H with correct heuristic (4)
• Visiting G and N from H AO2.1
o Calculating correct distance+heuristic for G and N (4)
• Identifying G as the smallest value
• Visiting L and M from G
o Calculating distance+heuristic for L and M
• Identifying L as the smallest value
• Visiting E
o Calculating distance+heuristic for E

• Final path: H-G-L-E

e.g.
Node Distance Heuristic distance+heuristic previous
travelled node
H 0 80 80 -
G 25 70 95 H
N 210 90 300 H
L 51+25=76 50 126 G
M 176+25=201 20 221 G
233+210=443 463 N
E 307+76=383 0 383 L
2 b iv 1 mark for decision, 2 marks for effect 3
e.g. AO2.1
Decision: (3)
• Choosing which node to take next
• The shortest distance+heuristic is taken

Effect:
• All adjoining nodes from this new node are taken
• Other nodes are compared again in future checks
• Assumed that this node is a shorter distance

15
H446/02 Mark Scheme Practice paper 2

• Adjoining nodes may not be shortest path …


• ….may need to backtrack to previous nodes
2 c Mark Band 3 – High level 9 AO1: Knowledge and Understanding
(7-9 marks) AO1.1 Indicative content
The candidate demonstrates a thorough knowledge and understanding of (2) • Carrying out more than one task at a
concurrent processing; the material is generally accurate and detailed. AO1.2 time
The candidate is able to apply their knowledge and understanding directly and (2) • Multiple processors
consistently to the context provided (searching algorithms). AO2.1 • Each processor performs
Evidence/examples will be explicitly relevant to the explanation. (2) simultaneously
The candidate provides a thorough discussion which is well balanced. AO3.3 • Each processor performs tasks
Evaluative comments are consistenly relevant and well considered. (3) independently
and/or
There is a well-developed line of reasoning which is clear and logically • A program has multiple threads
structured. The information presented is relevant and substantiated. • Each thread starts and ends at
different times
Mark Band 2 – Mid level • Each thread overlaps
(4-6 marks)
• Each thread runs independently
The candidate demonstrates reasonable knowledge and understanding of
concurrent processing; the material is generally accurate but at times
AO2: Application
underdeveloped.
• Each processor/thread performs a
The candidate is able to apply their knowledge and understanding directly to
search in a different direction
the context provided although one or two opportunities are missed. (searching
algorithms) Evidence/examples are for the most part implicitly relevant to the • Rather than going down one path,
explanation. go down 2+
The candidate provides a reasonable discussion, the majority of which is • E.g. apply different searches
focused. Evaluative comments are, for the most part appropriate, although simultaneously - perform breadth-
one or two opportunities for development are missed. first and depth-first simultaneously
There is a line of reasoning presented with some structure. The information • E.g. A* take the two shortest routes
presented is in the most part relevant and supported by some evidence at each decision point, update same
table
• Linear search can have multiple
Mark Band 1 – Low Level processors searching different areas
(1-3 marks) at the same time.
The candidate demonstrates a basic knowledge of concurrent processing with • Binary search doesn't benefit from
limited understanding shown; the material is basic and contains some an increase in speed with additional
inaccuracies. The candidates makes a limited attempt to apply acquired processors

16
H446/02 Mark Scheme Practice Paper 2

knowledge and understanding to the context provided (searching algorithms). AO3: Evaluation
The candidate provides a limited discussion which is narrow in focus. Candidates will need to evaluate the
Judgements if made are weak and unsubstantiated. benefits and drawbacks of concurrent
The information is basic and comunicated in an unstructured way. The processing in searching
information is supported by limited evidence and the relationship to the e.g.
evidence may not be clear. • Possibly find solution faster
• Takes up more memory
0 marks • Increase program throughput
No attempt to answer the question or response is not worthy of credit. • May waste time investigating
inefficient solutions
• More difficult to program especially
to cooperate
• More memory intensive
• Linear search scales very with
additional processors
• Binary search can perform better on
large data sets with one processor
than linear search with many
processors

3 a 1 mark for each feature 2 Allow any suitable feature


e.g. AO1.2
• Involves calculations (2)
• Has inputs, processes and outputs
• Involves logical reasoning

3 b Mark Band 3 – High level 9 AO1: Knowledge and Understanding


(7-9 marks) AO1.1 Indicative content
The candidate demonstrates a thorough knowledge and understanding of (2) Decomposition:
decomposition and abstraction; the material is generally accurate and detailed. AO1.2 • splits problem into sub-problems
The candidate is able to apply their knowledge and understanding directly and (2) • splits these problems further
consistently to the context provided. AO2.1 • until each problem can be solved
Evidence/examples will be explicitly relevant to the explanation. (2) • Allows the use of divide and
The candidate provides a thorough discussion which is well balanced. AO3.3 conquer
Evaluative comments are consistenly relevant and well considered (3) Abstraction
There is a well-developed line of reasoning which is clear and logically

17
H446/02 Mark Scheme Practice paper 2

structured. The information presented is relevant and substantiated. • Removing unnecessary


elements using symbols
Mark Band 2 – Mid level • Removing unnecessary
(4-6 marks)
The candidate demonstrates reasonable knoledge and understanding of design/programming/
decomposition and abstraction; the material is generally accurate but at times computational resources
underdeveloped.
The candidate is able to apply their knowledge and understanding directly to
the context provided although one or two opportunities are missed. AO2: Application
Evidence/examples are for the most part implicitly relevant to the explanation. • Split the simulation into subparts
The candidate provides a reasonable discussion, the majority of which is • E.g. generating rooms, patients,
focused. Evaluative comments are, for the most part appropriate, although people, scenarios, interaction
one or two opportunities for development are missed. • E.g. replacing how instruments look
There is a line of reasoning presented with some structure. The information with shapes, minimise features of
presented is in the most part relevant and supported by some evidence human body

AO3: Evaluation
Mark Band 1 – Low Level e.g.
(1-3 marks) • Increase speed of production
The candidate demonstrates a basic knowledge of decomposition and • Assign areas to specialities
abstraction with limited understanding shown; the material is basic and • Allows use of pre-existing modules
contains some inaccuracies. The candidates makes a limited attempt to apply • Allows re-use of new modules
acquired knowledge and understanding to the context provided. • Need to ensure subprograms can
The candidate provides a limited discussion which is narrow in focus. interact correctly
Judgements if made are weak and unsubstantiated. • Can introduce errors
The information is basic and comunicated in an unstructured way. The • Reduces processing/memory
information is supported by limited evidence and the relationship to the requirements
evidence may not be clear. • Increases response speeds of
programs
0 marks
No attempt to answer the question or response is not worthy of credit.
3 c 2 marks for definition, max 2 for application 4 Allow any reasonable example
Caching: AO1.1 A well-developed example can gain two
• Data that has been used is stored in cache/ram in case it is needed (2) marks
again AO2.1
• Allows faster access for future use (2)

18
H446/02 Mark Scheme Practice Paper 2

Application:
e.g.
• Store patients’ details/conditions/appearance
• Design of people in the simulation
• Design of specific rooms
3 d i 1 mark per bullet 3
• How the times scales as data size increases AO1.1
• O(n) = linear complexity (1)
• Increases at the same rate as the number of data items increases AO2.1
(2)

19
H446/02 Mark Scheme Practice paper 2

3 d ii 1 mark each 2
A = exponential AO1.1
B = logarithmic (2)
3 d iii 1 mark for recommendation, max 3 for explanation 4
• Recommend: Solution B AO1.2
Justification (2)
• A’s space does not scale well when increased in number of items AO2.1
• B’s space scales well / does not increase significantly with number of (2)
items
• As n increases at some point a will require significantly more space
than B
• Both have same time complexity so need to look at space

3 e 1 mark per bullet, max 2 for each tools 4


Breakpoints AO1.1
• Use to test the program works up to/at specific points (2)
• Check variable contents at specific points AO1.2
• Can set a point where the program stops running (2)

Stepping
• Can set the program to run line by line
• Slow down/watch execution
• Find the point where an error occurs
4 a 1 mark for each correct swap identified/described 6
AO1.2
sheep rabbit dog fox cow horse cat deer (3)
sheep rabbit fox dog cow horse cat deer AO2.1
sheep rabbit fox dog horse cow cat deer (3)
sheep rabbit fox dog horse cow deer cat
sheep rabbit fox horse dog cow deer cat
sheep rabbit fox horse dog deer cow cat
sheep rabbit horse fox dog deer cow cat
4 b 1 mark per bullet to max 7 7 Allow reversed true and false
• Correct function declaration, taking string1 and string2 as parameters AO2.1
• Use of a flag (1)
AO2.2

20
H446/02 Mark Scheme Practice Paper 2

• Looping through string2 by some means (2)


• Using string manipulators to check either letters or substrings of string2 AO3.2
• Correctly setting return value to true (4)
• Returning true or false accordingly
• Comments that explain how the algorithm works

e.g.
function contains(string1, string2)
wordInside = false
for i = 0 to (string2.length – string1.length)
if string2.substring(i, string1.length) ==
string1 then
wordInside=true
endif
next i
return wordInside
endfunction

4 c i 1 mark per bullet to max 4 4 Allow points by demonstration/example


• Merge sort splits the data AO1.1
• Merge sorts the split data as it is put back together (1)
• Bubble moves through the data in a linear way AO1.2
• Bubble moves through the data repeatedly (2)
• Merge is more efficient with larger volumes of data to sort AO2.1
• Merge may require more memory space (1)

4 c ii 1 mark per example 2


e.g. AO1.1
• Insertion (2)
• Quick
4 d 1 mark for each bullet 3
• Duck is smaller than goat AO2.1
• Duck is less than frog/elephant (3)
• Duck is equal to duck/less than elephant so only duck left

21
H446/02 Mark Scheme Practice paper 2

5 a i 1 mark per bullet to max 3 3


• Declaring the procedure and taking a player ID as parameter AO2.2
• Setting playerID to parameter (2)
• Setting boardPosition to 0 and money to 2000 AO3.2
(1)
e.g.
public procedure new(thePlayerID)
playerID = thePlayerID
boardPosition = 0
money = 2000
endprocedure
5 a ii 1 mark per bullet to max 4 4
• Declaration as public and procedure, named constructor/new and AO2.2
Taking all correct parameters (missing currentLevel) (2)
• Sets currentLevel to 0 AO3.2
• Setting all the data… (2)
• …to the matching parameters taken
e.g.
public procedure new(theName, theCost, theL0, theL1,
theL2, theL3, theImageLink, theSetSquare, theOwned)
name = theName
currentLevel = 0
cost = theCost
L0 = theL0
L1 = theL1
L2 = theL2
L3 = theL3
imageLink = theImageLink
setSquare = theSetSquare
owned = theOwned
endprocedure
5 a iii 1 mark per bullet to max 2 2
• Creating new instance e.g. squirrel = new Animal AO2.1
• Parameters matching part (b)(i) (2)

e.g.

22
H446/02 Mark Scheme Practice Paper 2

squirrel = new Animal(“Squirrel”, 1000, 10, 50, 100, 500,


“squirrel.bmp”, 6, “free”)
5 b i 1 mark for each correctly completed space 6
AO2.2
function playerMove(currentPlayer) (3)
dice1 = random(1,6) AO3.2
dice2 = random(1,6) (3)
position = currentPlayer.getPosition() +
dice1 + dice2
if dice1 == dice2 then
pickDeck(currentPlayer)
endif

if position > 25 then


currentPlayer.setMoney(currentPlayer.getMoney() +
500)
position = position - 26
endif
if position == 13 then
missAGo(currentPlayer)
elseif position != 0 then
checkAnimal(currentPlayer)
endif
return position
endfunction

5 b ii Mark Band 3 – High level 9 AO1: Knowledge and Understanding


(7-9 marks) AO1.1 Indicative content
The candidate demonstrates a thorough knowledge and understanding of (2) By Value
passing values by reference and by value; the material is generally accurate AO1.2 • sends the actual value
and detailed. (2) • if changes are made then only
The candidate is able to apply their knowledge and understanding directly and AO2.1 the local copy is amended
consistently to the context provided. (2) By Reference
Evidence/examples will be explicitly relevant to the explanation. The candidate AO3.3 • sends a pointer to the value

23
H446/02 Mark Scheme Practice paper 2

provides a thorough discussion which is well balanced. Evaluative comments (3) • The actual value is not
are consistently relevant and well considered sent/received
There is a well-developed line of reasoning which is clear and logically • If changed the original is also
structured. The information presented is relevant and substantiated. changed when the subroutine
ends
Mark Band 2 – Mid level
(4-6 marks) AO2: Application
The candidate demonstrates reasonable knoledge and understanding of • Send by value
passing values by reference and by value; the material is generally accurate • The currentPlayer value is
but at times underdeveloped. not /does not need to be
The candidate is able to apply their knowledge and understanding directly to changed in the subprogram
the context provided although one or two opportunities are missed. • Send by reference
Evidence/examples are for the most part implicitly relevant to the explanation.
• The currentPlayer value is
The candidate provides a reasonable discussion, the majority of which is
updated
focused. Evaluative comments are, for the most part appropriate, although
one or two opportunities for development are missed.
AO3: Evaluation
There is a line of reasoning presented with some structure. The information
presented is in the most part relevant and supported by some evidence • ByValue creates new memory
space…
• ByReference means existing
Mark Band 1 – Low Level memory space is used
(1-3 marks) • Depends if original variable is
The candidate demonstrates a basic knowledge of passing values by local/global
reference and by value with limited understanding shown; the material is basic • If local and just referenced, send
and contains some inaccuracies. The candidates makes a limited attempt to by value
apply acquired knowledge and understanding to the context provided. • If original value needs editing
The candidate provides a limited discussion which is narrow in focus. send by reference
Judgements if made are weak and unsubstantiated. • If passing by reference then
The information is basic and comunicated in an unstructured way. The instead of returning position
information is supported by limited evidence and the relationship to the the code could just amend
evidence may not be clear. currentPlayer.position
• If passing by value there could
0 marks be inconsistencies when
No attempt to answer the question or response is not worthy of credit. currentPlayer is passed to
other methods, for example
pickDeck

24
H446/02 Mark Scheme Practice Paper 2

5 c 1 mark per bullet to max 6 6


• Procedure declaration with correct name and parameter AO2.2 (4)
• Outputting the correct text from deck at headPointer AO3.2 (2)
• Sending to currentPlayer.setMoney …
• getMoney + deck at head pointer amount
• Increase the head pointer
• Set headPointer to 0 if position 40 or greater

procedure pickDeck(currentPlayer)
output(deck[headPointer].getTextToDisplay())
amount = deck[headPointer].getMoney()
currentPlayer.setMoney(currentPlayer.getMoney() +
amount)
headPointer = headPointer + 1
if headPointer == 40 then
headPointer = 0
endif
endprocedure

5 d • Declaring the procedure with correct parameters 10 Allow follow through for incorrect
• Check if the space/animal is free AO2.2(5) accessing of methods
o If free, outputting name and cost AO3.2(5)
o Checking if they want to buy
 Calling purchase with current player and animal
• If they own the animal, checking if they can upgrade
 If they can, asking if they want to upgrade outputting the
cost
 If they want to, calling the upgrade method
• If they don’t own the animal
o Calling chargeStay with the amount to charge and the current
player

25
H446/02 Mark Scheme Practice paper 2

e.g.
procedure checkAnimal(currentPlayer)

if board[currentPlayer.getPosition()].owned == “free”
answer = input(“Would you like to purchase “,
board[position].getName(), “? It costs “,
board[position].getCost()

if answer = “yes” then


purchase(currentPlayer, board[position])
endif

elseif board[currentPlayer.getPosition()].getOwned() == currentPlayer

if board[currentPlayer.getPosition()].getCurrentLevel()
!= “L3”
answer = input(“Upgrade? It costs “,
board[position].getCost())

if answer == “yes” then


board[currentPlayer.getPosition()].upgrade(currentPlayer)
endif

endif

else
amount = board[position].getAmountToCharge()
chargeStay(amount, currentPlayer)
endif
endprocedure

26
H446/02 Mark Scheme Practice Paper 2

Question Assessment Objectives Total


AO1.1 AO1.2 AO2.1 AO2.2 AO3.1 AO3.2 AO3.3
1ai 3 3
1aii 1 1
1b 4 4
1ci 1 2 2 5
1cii 1 2 2 5
1dim 3 3
1dii 1 1
1diiim 4 4
2a 2 2
2bi 1 1
2bii 1 1
2biiim 4 4 8
2biv 3 3
2c* 2 2 2 3 9
3a 2 2
3b* 2 2 2 3 9
3c 2 2 4
3di 1 2 3
3dii 2 2
3diiim 2 2 4
3e 2 2 4
4a 3 3 6
4bm 1 2 4 7
4ci 1 2 1 4
4cii 2 2
4d 3 3
5ai 2 1 3
5aii 2 2 4
5aiii 2 2
5bim 3 3 6
5bii* 2 2 2 3 9
5cm 4 2 6
5dm 5 5 10
TOTALS 22 29 45 18 0 17 9 140

* = extended response

m = mathematical content

27

You might also like