0% found this document useful (0 votes)
7 views15 pages

Types of Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views15 pages

Types of Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Mark Scheme

Question Answer/Indicative content Marks Guidance

1 a – STA store the value in the accumulator into a given 2


memory location
– LDA loads the value in a memory location into the
accumulator.
(1 per –)

b Direct addressing 1 Accept Symbolic Addressing

c – Answer contains at least 1 followed by 0 3 1


– Answer contains at least three 10s
– Answer contains exactly four 10s 0
(1 per –)
1

NB allow answers that are vertical or horizontal.

Total 6

© OCR 2024. You may photocopy this page. 1 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

2 Mark Band 3–High Level (7–9 marks) 9 AO1 Knowledge and Understanding

The candidate demonstrates a thorough knowledge and The following is indicative of possible factors / evidence
understanding of Object Oriented Programming and has that candidates may refer to but is not prescriptive or
discussed inheritance, polymorphism and encapsulation; exhaustive:
the material is generally accurate and detailed.
OOP involve solutions being constructed by means of
The candidate is able to apply their knowledge and objects that interact with each other. OOP uses classes
understanding directly and consistently to the context as templates to construct objects. An object has attributes
provided. Evidence / examples will be explicitly relevant (variables associated with it) and methods (subroutines
to the explanation. that form the actions an object can carry out).

The candidate provides a thorough discussion which is Inheritance is where a class retains the methods and
well balanced. Evaluative comments are consistently attributes of its parent class as well as having its own.
relevant and well-considered.
Encapsulation is the process of keeping an object's
There is a well-developed line of reasoning which is clear attributes private so they can only be accessed and
and logically structured. The information presented is changed via public methods.
relevant and substantiated.
Polymorphism means that objects of different types can
Mark Band 2–Mid Level (4–6 marks) be treated in the same way.

The candidate demonstrates reasonable knowledge and Procedural programming breaks a solution down into
understanding of a range of Object Oriented subroutines. These subroutines are re built and combined
Programming and has discussed at least two of: to form a program.
inheritance, polymorphism and encapsulation; the
material is generally accurate but at times

© OCR 2024. You may photocopy this page. 2 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

underdeveloped. AO2.1: Application

The candidate is able to apply their knowledge and The selected knowledge / examples should be directly
understanding directly to the context provided although related to the specific question. Examples may include
one or two opportunities are missed. but are not limited to:
Evidence / examples are for the most part implicitly
relevant to the explanation. Breaking a problem down into objects naturally lends
itself to teams as different team members can work on
The candidate provides a sound discussion, the majority different objects.
of which is focused. Evaluative comments are for the
most part appropriate, although one or two opportunities Inheritance means that one class can be coded and that
for development are missed. code used as the base for similar objects. This will save
the team time as they are able to build on work already
There is a line of reasoning presented with some done.
structure. The information presented is in the most part
relevant and supported by some evidence. Encapsulation means that objects only interact in the way
intended and prevents unexpected changed to attributes
Mark Band 1–Low Level (1–3 marks) having unforeseen consequences. This means there are
likely to be fewer issues as the team combines their code.
The candidate demonstrates a basic knowledge of Object
Oriented Programming with limited understanding shown; Polymorphism means that code can be written that is
the material is basic and contains some inaccuracies. For able to handle different objects in the same way. This
3 marks they have described at least one of inheritance, reduces the volume of code the team need to produce.
polymorphism or encapsulation. The candidate makes a
limited attempt to apply acquired knowledge and Procedural programming can be divided between a team
understanding to the context provided. with different team members tackling different
subroutines.

© OCR 2024. You may photocopy this page. 3 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

The candidate provides a limited discussion which is


narrow in focus. Judgments if made are weak and There are a number of similarities between the two
unsubstantiated. The information is basic and paradigms.
communicated in an unstructured way. The information is
supported by limited evidence and the relationship to the Certain problems lend themselves more to one than the
evidence may not be clear. other.

0 marks AO3.3: Evaluation


No attempt to answer the question or response is not
worthy of credit. Having considered the different sides to the argument
candidates will need to reach a supported judgment
based on the evidence included in their response.

Total 9

© OCR 2024. You may photocopy this page. 4 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

3 Mark band 6-8. High level response. 8


Candidate has described all 3 terms highlighting the
differences between machine code and assembly
language.
Candidate has used appropriate technical terminology
throughout.
There are few, if any, spelling errors or grammatical
errors.
Mark band 3-5. Medium level response.
Candidate has described two terms adequately.
Candidate has used some technical terminology in the
response.
There may be spelling errors or grammatical errors, but
they are not obtrusive.
Mark band 0-2. Low level response.
Candidate has listed some relevant points but failed to
give any detail.
There is a lack of cohesion in the response.
Candidate has failed to use correct technical terms in the
response.
Spelling and grammatical errors affect the readability of
the response.
Machine code:

Binary notation
Instructions operate on bytes of data
Dependent on architecture

© OCR 2024. You may photocopy this page. 5 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

Harder to program

Assembly language:

Low level language…


…but higher level than machine code / mnemonics /
hexadecimal
Uses mnemonics
Machine-specific / close to computer
Each instruction generally translated to 1 machine
code instruction

Assembler tasks:

Nothing about lexical analysis or code generation


Reserves storage for instructions & data
Replaces mnemonic opcodes by machine codes Examiner's Comments
Replaces symbolic addresses by numeric addresses
Creates symbol table This question covered the full range of abilities for
Checks syntax candidates and it was a good discriminator of levels of
Error diagnostics ability. A small but significant amount of candidates
answered about high level language compilers or
interpreters rather than an assembler.

Total 8

© OCR 2024. You may photocopy this page. 6 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

4 Self-contained object / (instance of a) class / entity / 6 Marks in pairs, max 3 pairs


real world object …
… contains routines / methods / attributes / data Examiner's Comments
Program split into small units/object…
… which are used (by other objects) to build a Those who knew what object oriented language was did
complex system quite well, with the average response able to gain four
Uses encapsulation… marks and a fair proportion gaining maximum marks on
…to hide data within objects / object only accessed this.
through methods
Inheritance…
… / superclass / subclass / derived classes

Total 6

© OCR 2024. You may photocopy this page. 7 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

5 i Part of the instruction / code 2 Examiner's Comments


Indicates what to do
Nearly all candidates achieved at least one mark in this
question.

ii Sequence of letters 3
Easy for a person to remember

Example:

ADD for addition Accept other relevant examples

Examiner's Comments

Nearly all candidates achieved at least two marks in this


question.

Total 5

6 a When an attribute is made private (so it can’t be directly 3


accessed or changed from outside the class) (1)
Public methods are used to read / amend the attribute’s
value (1)
The attribute name’s value can only be amended through
the method changeName. (1)

© OCR 2024. You may photocopy this page. 8 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

b When a class has the attributes and methods of its parent 3


class. (1) It may also have methods and attributes of its
own (1)
TreasureChest inherits from the class Treasure (1)

c Methods: (constructor/new), changeName, pickLock (1) 2 Do not penalise for not including constructor.
Attributes: value, weight, name, locked (1) Only give method mark if both other methods are listed
Only give attributes mark if all four attributes are listed.

Total 8

© OCR 2024. You may photocopy this page. 9 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

7 a i – Stores the value 10 (1) 3 MP3 Accept identifier

– In a memory location (1) (AO1.2)

– Given the label / symbolic address ten (1)

Examiner’s Comments
Surprisingly few candidates gained full marks on this
question. Many responses did not use appropriate
assembly language terminology e.g. label, memory
location.

ii Starting value in Pass or Fail 3


Accumulator
(AO2.1)
29 Fail
30 Pass
31 Fail
1 Mark per row

Examiner’s Comments
Very few candidates did not gain full marks on this
question.

© OCR 2024. You may photocopy this page. 10 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

b i LDA (1) 1

SUB (1)
ADD (1) (AO1.2)
INP (1)
(Max 1)
Examiner’s Comments
Most candidates identified correctly, an instruction which
changed the value in the Accumulator but fewer correctly
identified an instruction which changed the value in the
Program Counter.

ii BRA (1) 1

BRP (1)
BRZ (1) (AO1.2)

(Max 1)
Examiner’s Comments
Most candidates identified correctly, an instruction which
changed the value in the Accumulator but fewer correctly
identified an instruction which changed the value in the
Program Counter.

© OCR 2024. You may photocopy this page. 11 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii 20 1

(AO2.1)
Examiner’s Comments
Candidates invariably gave both correct output values.

iv 40 1

(AO2.1)

Examiner’s Comments
Candidates invariably gave both correct output values.

v Rounds up (the number input)… (1) 2 Rounds to multiple of ten gets one mark.

…To the nearest multiple of ten (AO2.2)


(and outputs it) (1)

Total 12

© OCR 2024. You may photocopy this page. 12 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

8 Mark Band 3–High Level (9-12 marks) 12 AO1


Object oriented programming makes use of classes
The candidate demonstrates a thorough knowledge and AO1.1 (templates) from which objects are made.
understanding of procedural and object oriented (2) Classes have attributes and methods
programming. The material is generally accurate and AO1.2 Classes can be encapsulated by making attributes private
detailed. (2) and providing public access methods
AO2.1 Object oriented programming supports inheritance which
The candidate is able to apply their knowledge and (23 allows classes to use attributes and methods of parent
understanding directly and consistently to the context AO3.3 classes.
provided. Evidence/examples will be explicitly relevant to (5) Object oriented programming supports polymorphism
the explanation. meaning that class attributes and methods can take on
many different forms if required.
The candidate provides a thorough discussion which is
well balanced. Evaluative comments are consistently AO2
relevant and well-considered. OO approach would call on classes per type of player or
enemy object
There is a well-developed line of reasoning which is clear Objects made from these classes, so one enemy class
and logically structured. The information presented is may generate many enemy objects, each with different
relevant and substantiated. values for their attributes (e.g. speed, energy)
Special types of Player or Enemy objects could be
Mark Band 2-Mid Level (5-8 marks) instantiated from classes that inherit from the original
Player/Enemy classes, but have attributes/methods of
The candidate demonstrates reasonable knowledge and their own.
understanding of procedural and object oriented Polymorphism would allow for the attributes/methods of
programming; the material is generally accurate but at Player/Enemy objects to behave differently from normal if
times underdeveloped. required.

© OCR 2024. You may photocopy this page. 13 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

The candidate is able to apply their knowledge and AO3


understanding directly to the context provided although OO promotes a modular approach (procedural through
one or two opportunities are missed. Evidence/examples use of subroutines, OO through classes).
are for the most part implicitly relevant to the explanation. OO is an abstraction of a real world problem, with classes
for each type of things to be modelled and objects for
The candidate provides a sound discussion, the majority each instance of these.
of which is focused. Evaluative comments are for the OO has advantages in data security in that encapsulation
most part appropriate, although one or two opportunities forces developers/users to use methods
for development are missed. (with their built in validation) to access/amend data stored
There is a line of reasoning presented with some in attributes.
structure. The information presented is in the most part OO has advantages in efficiency of design where classes
relevant and supported by some evidence. can be reused and can inherit from one another.
Procedural programming struggles to support this.
Mark Band 1-Low Level (1-4 marks) OO also offers flexibility through polymorphism.

The candidate demonstrates a basic knowledge of


procedural or object oriented programming; the material
is basic and contains some inaccuracies. The candidate
makes a limited attempt to apply acquired knowledge and
understanding to the context provided.

Total 12

© OCR 2024. You may photocopy this page. 14 of 15 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

9 –Immediate addressing… 2
–…operand is the value to be used. Examiner’s Comments
–Indirect Addressing… AO1.1
–…operand is the memory location holding a value Many candidates correctly cited another mode of
representing the memory location to be used. addressing outlined in the specification but descriptions
– Indexed Addressing… invariably lacked clarity, with the exception of Immediate
– …Operand is added to contents of Index Register to Addressing.
get memory location of value needed.
(1 mark for naming addressing mode, 1 mark for correct
description)

Total 2

© OCR 2024. You may photocopy this page. 15 of 15 Created in ExamBuilder

Powered by TCPDF (www.tcpdf.org)

You might also like