Professional Documents
Culture Documents
SDT Winter Exam 2022 MS FINAL (4) - Copy
SDT Winter Exam 2022 MS FINAL (4) - Copy
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.
Answer ALL questions
Marks
Question 1
Class Hotel
Data Rooms as whole number
Data Address as string
Data Distance as real number
Function Hotel()
End function
Function SetDistance(………………….)
………………….
End function
End class
a) The function Hotel has the same name as the class name. What is such a 2
function generally known as and what is the main purpose of this function?
Mark Scheme
Constructor (1 mark)
Initialises the variables (1 mark)
Page 2 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
b) There are TWO (2) functions by the same name Hotel. 2
What are the functions with same name known as in object-oriented languages?
Mark Scheme
Mark Scheme
GetRoom:
Returns whole number (1 mark)
Return Rooms (1 mark)
SetDistance:
Needs D as whole number (1 mark)
Distance = D (1 mark)
d) What are the functions GetRoom and SetDistance generally known as in object- 2
oriented languages?
Mark Scheme
Question 2
a) The following numbers are put in a queue: 1, -2, 5, -10, in that order.
Mark scheme
-10 (1 mark)
Mark scheme
1 (1 mark)
Page 3 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
iii) TWO (2) numbers are taken from the head of the queue. 2
The two numbers are then multiplied, and the result is put in the queue.
List the contents of the queue, starting from the head of the queue.
Mark scheme
-2, 5, -10 (1 mark for dequeues and multiplication, 1 mark for correct
order of the contents)
b) The following numbers are put on a stack: 1, -2, 5, -10, in that order.
Mark Scheme
1 (1 mark)
Mark Scheme
-10 (1 mark)
iii) TWO (2) numbers are taken from the top of the stack. 2
The two numbers are then multiplied, and the result is put on the stack.
List the contents of the stack, starting from the top of the stack.
Mark Scheme
-50, -2, 1 (1 mark for pops and multiplication, 1 mark for correct order of
the contents)
c) What TWO (2) complex data types are normally used to be queue and stack data 2
structures?
Mark scheme
Array
List
Total 10 Marks
Page 4 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
Question 3
Fill in the test values in the table below for each type of test condition. You must
use only whole numbers as test values.
Marking Scheme
Page 5 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
b) In the table below is a list of THREE (3) test methods used in testing the 3
correctness of programs. Fill in the missing parts of the test method descriptions.
Mark Scheme
Total 10 Marks
Question 4
Mark Scheme
Identifying/analysing the user requirements; (1 mark)
Writing the functional specification (1 mark)
Mark Scheme
Page 6 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
c) Explain FIVE (5) goals of software development models. 5
Mark Scheme
Total 10 Marks
Question 5
The following program gets the number of books from the user.
read books
if books greater than 0 then
total = total + books
read books
if books greater than 0 then
total = total + books
read books
if books greater than 0 then
total = total + books
if total ………………………
a) Explain why a loop is useful in this case and why an unbounded loop would be 3
most appropriate.
Mark Scheme
Without a loop the code will be repeated thus increasing in size (1 mark).
An unbounded loop is suitable as we don’t know when it will end (1 mark)
as it is dependent on the condition of books = 0 (1 mark).
(Accept an alternative explanation that includes the above essential
points)
Page 7 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
b) Write pseudocode that implements the above program using a loop. 5
Mark Scheme
The program should look something like (there may be other variations but
the following essential parts, in bold, must be present):
read books
Loop while books is greater than 0
total = total + books
read books
End loop
Mark Scheme
In bounded loop it is known, in advance, when the loop will end (1 mark) as
it is counter based and not dependent on a condition (1 mark).
Total 10 Marks
Question 6
columns
0 9
0
rows
Mark Scheme
Page 8 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
ii) Set the element highlighted in the grid to -1. 2
Mark Scheme
result = false
If p is ……… than or equal to 0 then
result = true
end if
……… result
End function
Mark Scheme
Mark Scheme
size
ii) The logical operator ………… means either condition must be true to give 1
a result of true.
Mark Scheme
Or / OR
Total 10 Marks
Page 9 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
Question 7
Mark Scheme
ii) An algorithm that scales well is one that does not significantly increase the 4
time it takes to complete as data increases.
The following are big O notations that represent how well algorithms scale.
Mark Scheme
Mark Scheme
linear
Mark Scheme
Binary
Mark Scheme
Bubble
Page 10 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
iv) ………… splits an array into sub-arrays and sorts each individually. 1
Mark Scheme
Quicksort
Total 10 Marks
Question 8
Copy and fill in the truth table below for the above equation.
P Q P AND Q P OR Q R
F F
F T
T F
T T
Mark Scheme
P Q P AND Q P OR Q R
F F F F T
F T F T F
T F F T F
T T T T F
Page 11 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
b) A simple logic circuit has TWO (2) inputs A and B, and TWO (2) outputs C and D. 4
C = NOT A AND B
D = NOT C
Draw a truth table that represents the logic of the above circuit for all
combinations of the inputs A and B.
Mark scheme
A B C D
F F F T
F T T F
T F F T
T T F T
Sets the value of variable var1 to 1 (ONE) if the value of variable var2 is higher
than 0 (ZERO).
Sets the value of variable var1 to 0 (ZERO) if the value of variable var2 is not
higher than 0 (ZERO).
Mark scheme
Total 10 Marks
Page 12 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
Question 9
Mark Scheme
Mark Scheme
Nested
iii) Variables which are made up of other variables are ……………. data types. 1
Mark Scheme
Complex
Mark Scheme
Repeating / looping
Mark Scheme
Mark Scheme
New
Page 13 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
b) Write a function in pseudocode that accepts ONE (1) parameter of type whole 4
number.
The function prints the string “Yes” if the number is a negative number or prints
the string “No” if it is a positive number.
Mark Scheme
The code written should generally solve the problem and will approximately
look like the above example. Marks can be gained from the essential
features such as the ones below:
1 mark for function structure (Function / End function)
1 mark for correct specification of the parameter
Maximum 2 marks for comparison (if, otherwise)
The indentations may be omitted. Allow for alternative pseudocode that
contains the essential ingredients as above.
Total 10 Marks
Page 14 of 18
Software Development Techniques © NCC Education Limited 2022
Marks
Question 10
a) In the following program various variables with different data types are declared.
These variables are then assigned values, but the programmer made a mistake
and assigned the values to the wrong variables.
Data a as string
Data b as whole number
Data c as real number
Data d as Boolean
Data e as character
a = 123
b = 1.23
c = “Hey”
d = ‘M’
e = True
Mark Scheme
Mark Scheme
End of paper
Page 15 of 18
Software Development Techniques © NCC Education Limited 2022
Learning Outcomes matrix
Grade descriptors
Page 16 of 18
Software Development Techniques © NCC Education Limited 2022
failing to use and data due to pre-defined minimum and data due to
pre-defined insufficient use techniques required to pass a meticulous use
techniques of pre-defined and/or criteria. due to an of pre-defined
and/or criteria. techniques accurate use of techniques
and/or criteria. pre-defined and/or criteria.
techniques
and/or criteria.
Identify and Demonstrates Demonstrates an Demonstrates a Demonstrates a Demonstrates an
use common little to no ability extremely limited satisfactory very good ability excellent ability
to adequately ability to ability to review to review the to
data review the adequately the effectiveness effectiveness comprehensively
structures effectiveness review the and and review the
and effectiveness appropriateness appropriateness effectiveness
appropriateness and of information of information and
of information appropriateness and data due to and data that appropriateness
and data by of information adequate use of goes beyond the of information
failing to use and data due to pre-defined minimum and data due to
pre-defined insufficient use techniques required to pass a meticulous use
techniques of pre-defined and/or criteria. due to an of pre-defined
and/or criteria. techniques accurate use of techniques
and/or criteria. pre-defined and/or criteria.
techniques
and/or criteria.
Explain and Incorrectly Inconsistently Can adequately Can Can consistently
use common identifies, identifies, adapts identify, adapt appropriately identify, adapt
adapts and and makes use and make use of identify, adapt and make use of
algorithms makes use of a of a limited a sufficient range and make use of a comprehensive
deficient range range of of techniques a range of range of
of techniques or techniques or and information techniques and techniques and
information information sources within information information
sources within sources within an array of sources within sources within
an array of an array of contexts. an array of an array of
contexts. contexts. contexts with contexts with
depth that goes depth.
beyond the
minimum to
pass.
Explain and Demonstrates Demonstrates an Demonstrates a Demonstrates a Demonstrates an
use test little to no ability extremely limited satisfactory very good ability excellent ability
to adequately ability to ability to review to review the to
strategies review the adequately the effectiveness effectiveness comprehensively
effectiveness review the and and review the
and effectiveness appropriateness appropriateness effectiveness
appropriateness and of information, of information, and
of information, appropriateness data and results data and results appropriateness
data and results of information, due to adequate that goes of information,
by failing to use data and results use of pre- beyond the data and results
pre-defined due to defined minimum due to a
techniques insufficient use techniques required to pass meticulous use
and/or criteria. of pre-defined and/or criteria. due to an of pre-defined
techniques accurate use of techniques
and/or criteria. pre-defined and/or criteria.
techniques
and/or criteria.
Explain how Provides an Provides an Provides a Provides a very Provides an
software is incorrect inadequate satisfactory good excellent to
interpretation of interpretation of interpretation of interpretation of outstanding
modularised an authoritative one or two several a variety of interpretation of
source, authoritative authoritative authoritative numerous
therefore sources and sources to meet sources that authoritative
inadequately therefore the requirements goes beyond the sources to
Page 17 of 18
Software Development Techniques © NCC Education Limited 2022
addressing ineffectively of problems that minimum critically address
problems that addresses are well defined requirements to problems that
are well defined problems that but non-routine. address are well defined
but non- are well defined problems that but non-routine.
routine. but non-routine. are well defined
but non-routine.
Page 18 of 18
Software Development Techniques © NCC Education Limited 2022