0% found this document useful (0 votes)
9 views9 pages

1.2.2 Applications Generation

Uploaded by

bainesm
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)
9 views9 pages

1.2.2 Applications Generation

Uploaded by

bainesm
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/ 9

Unit 2: Systems Software

(2b. Applications Generation, A Level Only Content)


Marks: /22
Answer all the questions.

1. Livid Lizards is a computer game in which players get to fire lizards from a cannon to knock down walls. Players
get to pick different types of lizards, each with qualities and special powers.

The game is coded using an object-oriented language. Below is the code for the lizard class:

The game uses a 2D graphics library. Explain why a linker would need to be used after compilation.

[3]

PhysicsAndMathsTutor.com
2. State three benefits of using library routines when a program is written.

[3]

PhysicsAndMathsTutor.com
3. Describe what happens during syntax analysis, when code is compiled.

[5]

PhysicsAndMathsTutor.com
4. A software development team is writing a word game.

The team is using Rapid Application Development.

The software team use a prebuilt library to create the Graphical User Interface.

(i) Give two advantages to the software team of using a library.

[2]

(ii) The program is compiled. Explain the process of compilation including how code from the library
becomes part of the finished program, justifying why each stage is necessary.

PhysicsAndMathsTutor.com
[9]

END OF QUESTION PAPER

PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

1 The user running the program will not 3 Up to 3 marks for a valid explanation.
necessarily have the library installed on
their machine (1) therefore the relevant
code needs to be included within the
final executable (1) – it is the job of the
linker to combine this code (1).

Total 3

2 Relatively error free / has already been 3


tested Examiner's Comments
Ready to use / saves time/already been
written Excellently answered, very few candidates
Used multiple times / common tasks / had any problem with this question and
reduces repeated code most candidates gained at least two out of
Programmer expertise the three marks.
Different source languages

Total 3

3 2 Marks from this section 5 No syntax check

Examiner's Comments
Statements / tokens are checked…
… against the rules / grammar of the Again the Principal Examiner was looking
language for more technical knowledge with this
valid example given question and it was apparent from the
range of answers given that this was one
3 Marks from this section question that showed true understanding of
the subject.

Errors reported as a list


Error diagnostics given
Detail added to symbol table…
…eg data type / scope / address
Receives output from lexical analysis /
passes code to code generation

Total 5

PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

4 i Saves time / money as prewritten (1) 2

Draws on expertise of other (AO1.2)


programmers (1)

Pre-tested (so likely to work) (1)

Can have been written in a different


language (1)

Examiner’s Comments
Those candidates who cited generic
(Max 2) advantages of using subroutines as
opposed to library routines did not gain
credit. The question asked for advantages
to the team of using a library.

ii Mark Band 3–High Level AO1.1 Points may include but are not limited to:
(7–9 marks)
The candidate demonstrates a (2) AO1 Knowledge and Understanding
thorough knowledge and
understanding of how source code is AO1.2 The compiler is effectively a group of
compiled and library code programs.
incorporated. The material is
generally accurate and detailed. (2) The stages of compilation are: lexical
analysis, syntax analysis, code generation
The candidate is able to apply their and optimisation.
knowledge and understanding AO2.1
directly and consistently to the A linker is then used to combine the object
context provided. Evidence / (2) code with the library code to make the final
examples will be explicitly relevant executable.
to the explanation. AO3.3
AO2.1 Application
The candidate provides a thorough (3)
discussion which is well balanced. Source code is input into a compiler
Evaluative comments are program.
consistently relevant and well- 9
considered. The first stage is lexical analysis in which..

There is a well-developed line of Comments and whitespace are removed


reasoning which is clear and
logically structured. The information Variables, and subroutines stored in
presented is relevant and symbol table
substantiated.
Which also holds data such as scope and
data type

Code is converted to a series of tokens

PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

Mark Band 2–Mid Level (4–6 marks) The series of tokens and symbol table is
The candidate demonstrates passed onto the next stage, syntax
reasonable knowledge and analysis:
understanding of how source code is Here the code is checked to ensure it
compiled and library code follows the rules of the language.
incorporated; the material is
generally accurate but at times This is often accomplished by placing the
underdeveloped. tokens into a (abstract syntax) tree.

The candidate is able to apply their Where it breaks the rules of the language
knowledge and understanding errors are generated.
directly to the context provided
although one or two opportunities If no rules are broken then it’s passed on to
are missed. Evidence / examples the next stage…
are for the most part implicitly
relevant to the explanation. ..Which is code generation.

The candidate provides a sound Here the object code (accept machine
discussion, the majority of which is code) is created.
focused. Evaluative comments are
for the most part appropriate, (i.e. the binary that is executed by the
although one or two opportunities for processor)
development are missed.
This code may be inefficient..
There is a line of reasoning
presented with some structure. The .. it may contain unnecessary instructions
information presented is in the most or groups of instructions that can be
part relevant and supported by some replaced by simpler ones.
evidence.
Code from the library is likely already
Mark Band 1–Low Level (1–3 marks) compiled.
The candidate demonstrates a basic
knowledge of how source code is And may well have been written in a
compiled and / or library code different language to the main program.
incorporated; the material is basic
and contains some inaccuracies. The main program source code will have
The candidate makes a limited contained lines importing the library code.
attempt to apply acquired knowledge
and understanding to the context A program called a linker can incorporate
provided. the code from the library with the main
program…
The candidate provides a limited …into a single executable file.
discussion which is narrow in focus. An alternative approach is for the main
Judgments if made are weak and executable to link to the compiled library
unsubstantiated. The information is code (i.e. dynamic linking).
basic and communicated in an
unstructured way. The information is
supported by limited evidence and
the relationship to the evidence may
not be clear.

PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

AO3.3 Evaluation
0 marks Lexical analysis is necessary to put the
No attempt to answer the question code into a format which can be read and
or response is not worthy of credit. processed (i.e. parsed) by the syntax
analyser.

Syntax Analysis is necessary to ensure the


code is valid in as much as it meets all the
structural rules of the language. This
guarantees it will run (though it might not
do as expected and may still have
occurrences of runtime errors).

Code generation is necessary to turn the


code into a format that the processor can
understand (i.e. binary machine code).

The code optimisation whilst not


necessary, does ensure the code runs
quicker or using less memory.

Linking is necessary to ensure the library


code is incorporated into the final program.

Examiner’s Comments
Candidates were assessed on the quality
of their extended response in this question.
Many candidates explained the stages of
compilation very well. Some went on to
describe how code from the library
becomes part of the finished program
equally well. Few justified why each stage
was necessary. Many candidates scored
well on this question.

Total 11

PhysicsAndMathsTutor.com

Powered by TCPDF (www.tcpdf.org)

You might also like