SDT Exam MS Sept 2016 - Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Software Development Techniques

1 September 2016

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.

Throughout the marking, please credit any valid alternative point.

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

a) The waterfall model is the traditional model for software development. Using a 6
diagram, show the FIVE (5) main stages of the model and how they are related.
Main stages: Analysis, Design, Implementation Testing, Maintenance.
Other stages are possible but they must be equivalent to these 5. One
mark for each stage (or equivalent) plus one mark for showing the linear
sequential nature of the model.

b) Explain the effect time can have on a large software project and how iterative 4
development can reduce this problem.
If there is a long time between requirements analysis and delivery, then a
customer’s requirements can change, meaning the software becomes
redundant (up to 2 marks). Breaking the project into smaller iterations
provides the user with working product early in the development and
allows changes to be made to the requirements as necessary through the
life of the project (up to 2 marks). Marks may be awarded for any valid
points up to a total of 4.

Total 10 Marks

Page 2 of 12
Software Development Techniques © NCC Education Limited 2015
Marks
Question 2

a) ExplainTHREE (3) criteria of good algorithms. 3


1 mark for each valid point (up to 3 marks).
A good algorithm is
 Readable - can understand what it is doing.
 Maintainable - the algorithm can be changed easily.
 Well Documented - there are instructions for people who wish to
make use of the algorithm.
 Complete - contains the steps required to arrive at a desired
conclusion.
 Robust-can deal with unlikely situations and incorrect data.
 Efficient- accomplishes its task in the minimum number of steps.

b) Briefly explain the relationship between algorithms and Pseudocode. 1

An Algorithm is a series of instructions set of problem solving.


Pseudocode is one of the methods to describe an algorithm. (1 mark)

c) Explain with THREE (3) reasons why pseudocode is used. 3


Pseudocode provides the following advantages: language independence,
easy to understand, easy to check on paper (up to 3 marks).

d) What is a flow chart? Evaluate the usage of flow chart. 3

Diagrammatic representation of an algorithm or workflow (1 mark). Clearly


shows the structure of an algorithm (1 mark), can be complicated if the
algorithm is complex (1 mark). Award marks for any valid points up to 3
marks).

Total 10 Marks

Page 3 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 3

a) The following pseudocode algorithm calculates user age. Perform a desk-check 10


on this algorithm using a table to show the values in each variable after the
execution of each line. For your desk-check, use 2016 as current year and 1970
as the year you were born.

1. data bornYear as whole number


2. data currentYear as whole number
3. data age as wholenumber
4. currentYear = 2016
5. age = 0
6. output “Welcome to the age calculator”
7. output “What year were you born”
8. input bornYear
9. age = currentYear – bornYear
10. output “This year you will be:”
11. output age
12. output “Thankyou for using this program.”

1 mark per line from 4-12 plus 1 mark for lines 1-3
Line bornYear currentYear age Notes
1 - - - bornYear declared
2 - - - currentYear declared
3 - - - age declared
4 - 2016 - current year initialisation to 2016
5 - 2016 0 age initialised to 0
6 - 2016 0 Output
7 - 2016 0 Output
8 1970 2016 0 User inputs 1970
9 1970 2016 46 age calculated
10 1970 2016 46 Output
11 1970 2016 46 Output variable data
12 1970 2016 46 Output

Total 10 Marks

Page 4 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 4

a) Explain the stack data structure 5


Stack is a LIFO structure (1 mark), can be viewed as a pile of things where
we have to take the remove the top item to get to those below (up to2
marks for suitable explanation).
We push items onto a stack and pop items from a stack. (2 marks)

b) Explain the queue data structure 3


Queue is a FIFO structure, (1 mark) like a pipeline where things go in one
end and out the other (up to 2 marks for suitable explanation).

c) Explain the list data structure 2


A list is an array that can grow in size as it is needed. (1 mark) If not
knowing how many elements we need in an array, we could use list data
structure as it just gets bigger as is needed (up to 1 marks for suitable
explanation).

Total 10 Marks

Question 5

a) Give a brief outline of the quicksort algorithm. 8


1. We have an array which may or may not be sorted
2. Choose a pivot value
3. Separate into two arrays
a. those which are greater than the pivot
b. those which a less than the pivot
4. Apply quicksort to each of these array
5. when all finished, merge arras together

1 mark per line (up to 5) as detailed here, order is important – up to 3 marks


for correct order.
b) Explain what big O notation tells us about sorting algorithms. 2

Big O notation is a measure of the efficiency of an algorithm, it tells us


which sorting algorithms are likely to be better for certain types of data.
(up to 2 marks for valid explanation).

Total 10 Marks

Page 5 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 6

a) The table below shows the tax that is applied to income. The tax value increases 8
if someone earns more than a certain amount.

Income Tax Rate


Less than 11,000 0.0
11,000 – 50,000 0.2
Greater than 50,000 0.5

Write a pseudocode algorithm that accepts a value for income as its input and
displays the tax rate that will be applied to that income.

1. data salary as whole number


2. data taxRate as real number
3. output "Please enter your salary"
4. input salary
5. if salary > 50000 then
6. taxRate = 0.5
7. else if salary >= 11000
8. taxRate = 0.2
9. else
10. taxRate = 0
11. end if
12. output "Your tax rate is" + taxRate
13. output "Goodbye!"

appropriate use of if else statement 3 marks, correct logical conditions 3


marks, appropriate variable names 1 mark, appropriate data types 1 mark.

b) Suggest TWO (2) appropriate boundary test values for the algorithm produced in 2
6a.
Any two values that are clustered around 50000 and 11000 would be
appropriate.

Total 10 Marks

Page 6 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 7

a) Complete the truth table below for the logical equation (A OR B) AND (A OR C). 10
A B C A OR B A OR C (A OR B) AND (A OR C)
False False False False False False
False False True False True False
False True False True False
False True True True True
True False False
True False True
True True False
True True True

2 Marks for completing column A OR B. 2 marks for completing column A


OR C. 6 marks for completing final column.

A B C A OR B A OR C (A OR B) AND (A OR C)
False False False False False False
False False True False True False
False True False True False False
False True True True True True
True False False True True True
True False True True True True
True True False True True True
True True True True True True

Total 10 Marks

Page 7 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 8

a) The following algorithm finds the square of a number by multiplying it by itself. 6

1 data number as whole number


2 data square as whole number
3 output "Please enter the number"
4 input number
5 square = number * number
6 output "The answer is " + square

Using appropriate pseudocode, show how this algorithm can be turned into a
function.

Function Square (needs number as whole number)


1 data square as whole number
2 square = number * number
3 return square
End function

1 mark for keyword “Function” 1 mark for parameter, 1 mark for variable
declaration, 1 mark for return value. Up to 2 marks for clarity.

b) Explain TWO (2) advantages of using functions in the code above. 4

1 mark for each benefit (up to 2 marks) plus one for each explanation (up to
2 marks)
Breaks problems down into manageable parts
Simplifies checking and testing
Make it easier to change/expand programs
Easier to follow programs

Total 10 Marks

Page 8 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 9

a) Testing helps to determine if a program is correct. Explain FOUR (4) criteria that 8
determine software correctness.

Up to 2 marks per valid point with explanation:


 It must handle all the required functionality for all valid data.
 It must not generate unexpected behaviour.
 It must respond appropriately to all anticipated data.
 It must have sufficient error checking.

b) Explain with TWO (2) reasons why it is not recommended that developers test 2
their own code.

Up to 2 marks for valid points made:


 Developer often do not want his code to fail as developer has worked
hard on it.
 Developer may not see the problems that other people can
 Testing often requires a different set of skills to that of writing code.

Total 10 Marks

Page 9 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Question 10

a) In Object Oriented Programming (OOP), explain the concept of a constructor. 2

A constructor is a method that runs when an object is created


Constructor methods allow us to set what the default values of a newly
constructed object will be.
The constructor method has the same name as the class to which the
object belongs.
up to 2 Marks for valid points

b) The following class is used to describe objects of type FoodItem. These objects 8
would appear in a menu program for a restaurant. The class requires a
constructor method to initialise its two variables. Write some pseudocode to
show the constructor for this class.

Class FoodItem
data name as String
data price as whole number

// Constructor method to be written here

End Class

1 mark for function keyword, 1 mark for correct name, 2 marks for input
variables, 2 marks for correct input data types, 2 marks for function
contents.

function FoodItem (needs n as String, p as whole number)


name = n
price = p
end function

Total 10 Marks

End of paper

Page 10 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Learning Outcomes matrix

Question Learning Outcomes Marker can differentiate


assessed between varying levels of
achievement
1 1 Yes
2 2 Yes
3 2 Yes
4 4 Yes
5 5 Yes
6 3, 6 Yes
7 5 Yes
8 7, 2 Yes
9 6 Yes
10 7 Yes

Page 11 of 12
Software Development Techniques © NCC Education Limited 2016
Marks
Grade descriptors

Learning Pass Merit Distinction


Outcome
Identify and Provide adequate Provide detailed and Provide
explain the key ability to explain the coherent comprehensive, lucid
stages of subject matter explanation of the explanation of the
software subject matter subject matter
development
lifecycles
Express, design Demonstrate ability Demonstrate ability Demonstrate ability to
and evaluate to perform the task to perform the task perform the task to the
algorithms consistently well highest standard
Identify and use Demonstrate ability Demonstrate ability Demonstrate ability to
programming to perform the task to perform the task perform the task to the
language consistently well highest standard
constructs
Identify and use Demonstrate ability Demonstrate ability Demonstrate ability to
common data to perform the task to perform the task perform the task to the
structures consistently well highest standard
Explain and use Demonstrate Demonstrate Demonstrate
common adequate ability to detailed and comprehensive, lucid
algorithms explain the subject coherent explanation of the
matter; explanation of the subject matter;
Demonstrate subject matter; Demonstrate highly
adequate and Demonstrate appropriate and
appropriate use appropriate and effective use
effective use
Explain and use Demonstrate Demonstrate Demonstrate
test strategies adequate ability to detailed and comprehensive, lucid
explain the subject coherent explanation of the
matter; explanation of the subject matter;
Demonstrate subject matter; Demonstrate highly
adequate and Demonstrate appropriate and
appropriate use appropriate and effective use
effective use
Explain how Provide adequate Provide detailed and Provide
software is ability to explain the coherent comprehensive, lucid
modularised subject matter explanation of the explanation of the
subject matter subject matter

Page 12 of 12
Software Development Techniques © NCC Education Limited 2016

You might also like