Professional Documents
Culture Documents
7 August 2015
Marking Scheme
This marking scheme has been prepared as a guide only to markers. This is not a set of
model answers, or the exclusive answers to the questions, and there will frequently be
alternative responses which will provide a valid answer. Markers are advised that, unless a
question specifies that an answer be provided in a particular form, then an answer that is
correct (factually or in practical terms) must be given the available marks.
If there is doubt as to the correctness of an answer, the relevant NCC Education materials
should be the first authority.
Where markers award half marks in any part of a question, they should ensure that
the total mark recorded for the question is rounded up to a whole mark.
Marker's comments:
Moderator's comments:
Marks
Question 1
a) Explain what is meant by the term compilation and explain its relationship to low 4
and high level languages.
Compilation is the process of turning human readable (1 mark) high level
languages (1 mark) into machine comprehensible (1 mark) low level
languages (1 mark).
b) Briefly explain what is meant by pseudocode and provide TWO (2) advantages 6
and TWO (2) disadvantages of its use.
Pseudocode is an implementation independent (1 mark) representation of
structured programming processes (1 mark).
Award 1 mark for each advantage and disadvantage, which might include:
Advantages:
Disadvantages:
Total: 10 Marks
Page 2 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 2
a) The function below implements a form of system login which requires both a 10
username and password before it allows for the next pieces of the code to be
executed. Using an appropriate technique, such as test cases or a desk check,
identify the flaw in the code and outline how it could be fixed. You should
describe the techniques you used to identify the error.
The maximum number of marks awarded for this question is 10. Award up
to 2 marks for:
The flaw is in line 8, which returns false only if both the username and
password are incorrect – it will return true if one or the other or both are
correct. Students should identify the solution is to change the ‘and’ to an
‘or’.
Note: It is not possible to give samples for all the techniques students may
use, as these are wide-ranging and varied. However, appropriate
techniques would include desk-checks on data, running white box test
cases on the function, or black box testing.
Total: 10 Marks
Page 3 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 3
a) Define the terms primitive and complex with relation to data types and provide 4
ONE (1) example of each term.
Primitive data types are the building blocks that are used to build all other
data types (1 mark). An example of a primitive data type is the real number
data type (1 mark)
b) For each of the following, suggest an appropriate data type and justify your
decision:
Award 1 mark for a suitable data type and 1 mark for the justification
Award 1 mark for a suitable data type and 1 mark for the justification
Award 1 mark for a suitable data type and 1 mark for the justification
Total: 10 Marks
Page 4 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 4
a) Construct the truth table for the logical comparison ((A AND B) OR (B AND A)). 8
You should also explain why the second conditional may be redundant.
T T
T F
F T
F F
T T T T T
T F F F F
F T F F F
F F F F F
Award 2 marks for identifying that (A and B) and (B and A) are redundant
compounds and only one is required.
b) Provide ONE (1) example of a compound conditional operator and provide ONE 2
(1) example of a circumstance in which it might be used.
One mark for OR, AND, or even XOR. 1 mark for a suitable and relevant
circumstance, such as ‘If the age is greater than ten AND the age is less
than ten’
Total: 10 Marks
Page 5 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 5
a) Explain what is meant by the term assigned memory and allocated memory and 4
provide ONE (1) pseudocode example of each term.
b) Define the terms bounded loop and unbounded loop and provide ONE (1) 6
pseudocode example of each term.
A bounded loop is one where we know at runtime how many times to run
the loop (1 mark), and an unbounded loop is one that will terminate only
when some unknowable condition is met (1 mark).
Bounded loop:
Unbounded loop:
Total: 10 Marks
Page 6 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 6
b) Explain the difference between black box and white box testing and explain what 6
program deficiencies each method is best suited to identifying.
Black box testing involves testing inputs against expected outcomes (1
mark), whereas white box testing stresses each path through a program (1
mark) to make sure all branches can be reached (1 mark).
Total: 10 Marks
Page 7 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 7
a) Briefly describe the term invalid input in relation to a computer program and 4
provide ONE (1) example of a scenario in which it may cause problems to a
developer.
Invalid input is when data comes from a user or external source (1 mark) in
a form that we are not expecting in our code (1 mark). For example, we
may ask a user for two numbers, expecting them to be whole numbers but
we are provided them as words (1 mark). This requires us to have
additional handling of user data in our programs (1 mark).
The statement is correct because it is the point from which all future
decisions flow (1 mark). Bad choice of data representation will lead to
more complex code (1 mark) and considerable converting and processing
of data to suit the needs of the algorithms (1 mark), adding a processing
overhead (1 mark).
Note: candidates should get the marks provided they put together a cogent
statement of validity, whether for or against.
Total: 10 Marks
Page 8 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 8
Total: 10 Marks
Page 9 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 9
a) Define the term recursion and briefly describe the differences between recursion 6
and traditional forms of iteration. You should provide ONE (1) example of a
scenario in which it could not make sense to use recursion.
Recursion is a form of iteration that works by calling the function in which
the calling code is contained (1 mark), thus creating a function which calls
itself (1 mark) until some logical termination point is reached (1 mark).
b) Outline the difference between a stack and a queue. You should support your 4
answer with a brief definition of each term.
A stack is a data structure in which we operate in a LIFO manner (1 mark),
where data comes off in the reverse order in which it was added (1 mark).
A queue is a data structure which operates in a FIFO manner (1 mark) in
which data comes off in the order it was added (1 mark).
Total: 10 Marks
Page 10 of 15
Software Development Techniques © NCC Education Limited 2015
Marks
Question 10
a) Give a pseudocode outline of a class called Sofa. Its attributes are length, width, 6
height and colour. The length, width and height are stored in millimetres. The
colour is stored as a string.
Page 11 of 15
Software Development Techniques © NCC Education Limited 2015
The maximum number of marks awarded to this question is 6. Award ½ marks for
each attribute up to a maximum of 2 marks. Award ½ marks for each setter up to a
maximum of 2 marks. Award ½ marks for each getter up to a maximum of 2 marks.
Class Sofa
length = l
End Function
return length
End Function
width = w
End Function
return width
End Function
height = h
End Function
return height
End Function
colour = c
End Function
Page 12 of 15
Software Development Techniques © NCC Education Limited 2015
b) Using the class above, add a constructor method that allows for all four of these 4
values to be set when the object is instantiated.
length = l
width = w
height = h
colour = c
End Function
Total: 10 Marks
Page 13 of 15
Software Development Techniques © NCC Education Limited 2015
Learning Outcomes matrix
Page 14 of 15
Software Development Techniques © NCC Education Limited 2015
Grade descriptors
Page 15 of 15
Software Development Techniques © NCC Education Limited 2015