Professional Documents
Culture Documents
SDT Summer Exam 2022 Ms Final
SDT Summer Exam 2022 Ms Final
08 June 2022
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 Student
Data Name as String
Data Gender as Character
Data Age as Whole number
Data Average as Real number
i) What is the function Student which has the same name as the class name 1
generally known as?
Mark Scheme
Constructor
Mark Scheme
It is used to initialise the class’/object’s variables
***Accept any other similar statement.
iii) Add the method printName to Student class that prints the Name attribute. 2
Mark Scheme
Function printName()
Output(Name)
End function
1 mark for method structure (brackets may be omitted)
1 mark for the output statement
Page 2 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) Add an accessor method to Student class that gets the student’s average. 3
Mark Scheme
Function getAverage() returns Real number
Return Average
End function
1 mark for the correct function structure (Function/End function).
1 mark for the correct return type of the function.
1 mark for the correct return statement.
*** Accept alternative function name.
c) Declare and create a new object named PGStudent with the following attributes: 3
Name = Happy Musta, Gender = M, Age = 17, Average = 65.81
Mark Scheme
Data PGStudent as Student
PGStudent = new Student (“Happy Musta”, ‘M’, 17, 65.81)
1 mark for correct object declaration
1 mark for use of the word “new”
1 mark for correct use of the attributes as parameters
Total 10 Marks
Question 2
a) In a queue data structure that stores whole numbers, the Queue operation is
used to put a number at the end (or tail) of the queue and the Dequeue operation
is used to take a number from the start (or head) of the queue.
The inputs and the outputs of the Queue and Dequeue operations can be traced
to verify that they work correctly. Answer the following questions:
Mark Scheme
First-In-First-Out (1 mark).
An array data structure (1 mark)- Accept List structure.
Page 3 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
ii) You test the inputs and the outputs of the Queue operation by queuing the 4
test values 0, -1, 9, -4, in that order, i.e. first 0 and last -4. Demonstrate this
by filling in the trace table below. HoQ: Head of Queue, ToQ: Tail of
Queue.
Mark Scheme
1 mark for each correctly filled row (maximum 4 marks)
iii) You also need to test the Dequeue operation using the final values in the 4
queue in ii) above. Demonstrate this by filling in the trace table below.
Mark Scheme
1 mark for each correctly filled row (maximum 4 marks)
Dequeued Queue contents after
value dequeuing
HoQ ToQ
1st Dequeue 0 -1 9 -4
2nd Dequeue -1 9 -4
3rd Dequeue 9 -4
4th Dequeue 4
Total 10 Marks
Page 4 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
Question 3
a) Below is a program that accepts a whole number and tests to see if the number 7
is an error or is a good number:
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 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) In the table below is list of descriptions for THREE (3) test methods used in 3
testing the integrity of software. Fill in the names given to the each of the test
methods described.
Mark Scheme
1 mark for each correct test name, up to maximum 3 marks
Test method description Name given to test method
Used to test the logic of code Whitebox test / Desk-checking
in functions
Used to test inputs/outputs of Blackbox test
functions
Used to make sure different Integration test
functions work together
Total 10 Marks
Question 4
Mark Scheme
To manage software complexity (1 mark) and to facilitate production
of defect free software (1 mark) that conforms to user requirements (1
mark).
Page 6 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
ii) What are the key stages of SDLC? You need to list them in the correct 4
order.
Mark Scheme
• Requirements
• Design
• Implementation
• Testing
• Maintenance
1 mark for 2 correct
2 marks for 3 correct
3 marks for 4 correct
4 marks for 5 correct
If 5 correct stages but not in correct order, then deduct 1 mark.
Identify the most suitable lifecycle development model for the project and briefly
explain how it works.
Mark Scheme
A suitable development method is Waterfall model (1 mark). It has
sequential stages (1 mark) where next stage is started only after the
previous stage is completed (1 mark).
*** Accept Iterative Waterfall method.
***Accept alternative explanation containing key points as above.
Total 10 Marks
Page 7 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
Question 5
The following algorithm takes the number of newspapers delivered by THREE (3) delivery
workers and calculates the total.
You have been asked to redesign the algorithm using a loop. You must decide whether to
use a bounded loop or an unbounded loop for the design of this algorithm.
a) Explain the differences between a bounded and an unbounded loop. Which type 3
of loop should be used for the above requirement?
Mark Scheme
In bounded loop we know how many times we are going to repeat the loop
(1 mark). In unbounded loop it repeats only until a logical condition is met
(1 mark).
There are 3 rounds of delivery, so bounded loop is most appropriate here (1
mark).
Page 8 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) Write a pseudocode that implements the above algorithm using a loop. 7
Mark Scheme
The algorithm should look something like (there may be many variations):
01 Data papers as whole number
02 Data total as whole number
03 Data counter as whole number (1 mark)
04 Counter = 0 (1 mark)
05 papers = 0
06 output “Welcome to the newspaper delivery calculator”
07 Loop until counter is equal to 3
08 Output “Type in number of newspapers:”
09 Input papers
10 total = total + papers
11 Counter = counter + 1
12 Next loop
13 Output “The total number of newspapers is:”
14 Output total
15 Output “Thank you for using this program.”
Total 10 Marks
Question 6
i) If the array anArray can store a maximum of 1500 whole numbers, then 2
what is the value of X? You must show how you arrived at the answer.
Mark Scheme
X = 1500 / 100 (1 mark)
X = 15 (1 mark)
Mark Scheme
Multi-dimensional / two-dimensional
Page 9 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) Below is a program that stores -1 in all elements of the array myArray. However, 5
the programmer left out some parts of the program. Fill in the missing parts (you
can write down only the lines that need completing).
counter = ............
Loop ............counter is equal to sizeof(myArray)
myArray(............) = -1
counter = counter ............1
End loop
Mark Scheme
1 mark for each of the following, up to maximum 5 marks
Whole number
0
Until
Counter
+
Mark Scheme
Size / complexity
ii) The logical operator ………… means both conditions must be true to give a 1
result of true.
Mark Scheme
And / AND
Total 10 Marks
Question 7
a) In searching and sorting algorithms, the Big O notation is a measure of how well
an algorithm scales.
Mark Scheme
The Big O notation is a measure of how the time of a search or a sort
increase (1 mark) as the size of data increases (1 mark).
***Accept a similar description
Page 10 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
ii) What is the Big O notation for an algorithm that has constant scaling for 1
any size of data?
Mark Scheme
O (1) (1 mark)
iii) What is the Big O notation for an algorithm that has scaling directly 1
proportional (linearly) to the size of data?
Mark Scheme
O (n) (1 mark)
01 swapped = true
02 loop while swapped is true
03 counter = 0
04 swapped = false
05 loop while counter is less than sizeof(nums) - 1
06 if nums[counter] is greater than nums[counter+1] then
07 temp = nums[counter]
08 nums[counter] = nums[counter +1]
09 nums[counter+1] = temp
10 swapped = true
11 end if
12 counter = counter+1
13 next loop
14 next loop
i) Identify what this sorting method is and state what the order of the sorting 2
is (i.e. descending or ascending).
Mark Scheme
This is bubble-sort (1 mark). It is sorting in ascending order (1 mark).
ii) Explain, in general terms and in one sentence, the main purpose of the
code between lines 6 and 11.
2
Mark Scheme
Lines 6 to 11 are checking to see if the next number is smaller than
the present one (1 mark) and if it is, the two numbers are swapped (1
mark).
Page 11 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
iii) What is the Big O notation of this sorting algorithm? 1
Mark Scheme
O(n2) (1 mark).
Mark Scheme
Repeats until all numbers are sorted / until no swapping is required (1
mark).
***Do not accept “loops until swapped is true”.
Total 10 Marks
Question 8
i) Copy and fill in the table below to show that the above rule is correct for all 5
combinations of logic values of X and Y.
Mark Scheme
ii) Which two columns show that the above rule is correct? 1
Mark Scheme
The 5th and the 7th columns are the same (1 mark)
Page 12 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) The following if statements assign values to the variable Q depending on the 4
values of the variable P. Both variables P and Q are of data type whole number.
if P < 0 then
Q = -1
otherwise
if P >= 1 and P <= 5 then
Q = 1
otherwise
Q = 0
end if
end if
Fill in the missing values in the Q column in the table below for each value in the
P column.
P Q
-1
0
1
6
Marking scheme
1 mark for each correct entry in the Q column (maximum 4 marks)
P Q
-1 -1
0 0
1 1
6 0
Total 10 Marks
Page 13 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
Question 9
a) The following table lists descriptions of SIX (6) qualities of a good algorithm. In 6
the Qualities column, add the corresponding quality from the choices listed
below:
Mark Scheme
1 mark for each correct order up to maximum 6 marks
Page 14 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
b) Write a function called AddNumbers in pseudocode that takes two whole 4
numbers, Num1 and Num2, as parameters, adds them up and returns the result
as a whole number. You should use the names above in your pseudocode.
Mark Scheme
Function AddNumbers (needs Num1 as whole number, Num2 as whole
number)
returns whole number
return (Num1 + Num2)
End function
Total 10 Marks
Question 10
a) Identify the data type that can store the kind of data described by the following
statements and give ONE (1) example of data in each case.
i) Can store negative and positive numbers that are not fractions. 2
Mark Scheme
Whole number / integer (1 mark)
Any integer example (Do not allow a decimal example) (1 mark)
ii) Can store numbers that can include negative or positive fractions. 2
Mark Scheme
Real number / float / decimal (1 mark)
Any decimal number example (Do not allow an integer example) (1
mark)
Mark Scheme
Boolean (1 mark)
False / true (Do not allow any non-logical example) (1 mark)
Page 15 of 19
Software Development Techniques © NCC Education Limited 2022
Marks
iv) Can store several alpha-numeric characters 2
Mark Scheme
String (1 mark)
Any string including letters, numbers, symbols, or combination of (1
mark)
Mark Scheme
Character (1 mark)
Any single letter by itself or within ‘’ delimiters (Do not allow
character within “” delimiters) (1 mark)
Total 10 Marks
End of paper
Page 16 of 19
Software Development Techniques © NCC Education Limited 2022
Learning Outcomes matrix
Grade descriptors
Page 17 of 19
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 18 of 19
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 19 of 19
Software Development Techniques © NCC Education Limited 2022