Você está na página 1de 9

Software Development Techniques

3 March 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) Explain the difference between the terms compilation and interpretation. 6


The maximum number of marks for each question is 6. Award up to 3 marks for explaining
each term:

Compilation – Complete source code is converted to intermediate step (1 mark) and then
combined with other resources (1 mark). Finally assembly code is produced (1 mark).

Interpretation – Each line of code is interpreted (1 mark) and executed in turn (1 mark).
Requires an interpreter to be running on the host platform (1 mark).

Note: Credit alternative valid points.

b) State TWO (2) advantages of compilation in relation to software development. 2

Award 1 mark for stating an advantage up to a maximum of 2 marks:

It produces a fixed executable, which will be optimised for the chosen platform (1 mark).
Needs no other resources to run (1 mark).

c) State TWO (2) advantages of interpretation in relation to software development. 2

Award 1 mark for stating an advantage up to a maximum of 2 marks:

Highly portable code as long as the interpreter is available on other platforms (1 mark).
Fast development time as no compilation stage required to test code (1 mark)

Total: 10 Marks

Marks
Question 2

The waterfall model is a traditional approach to software development that has a number of stages.
a) Explain the purpose of the testing stage in relation to the waterfall model and provide TWO (2) 3
examples of types of testing.
Testing is the verification and validation of the software (1 mark). Award 1 mark for each
example up to a maximum of 2 marks. Examples include: unit testing and integration
testing (although unit testing may have been carried out during implementation)

b) State and briefly explain TWO (2) testing strategies used during software development. 4
Black-box testing (1 mark) and white box testing (1 mark). Black box testing is functional
testing and checks the output of the program based on a given output (1 mark). White box
testing is used to assess the flow of logic through a program (1 mark).

Note: Credit valid alternative points.

c) Outline THREE (3) potential problems that can arise during testing when using the waterfall 3
model.
Testing late on a large project may result in finding problems with requirements (1 mark)
that are too costly to fix (1 mark). Therefore testing should ideally be carried out earlier in
the lifecycle (1 mark) (3).

Note: Credit valid alternative points.

Total: 10 Marks

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

a) The following algorithm can be used to determine the sum of three prices and add 20% 10
tax. Perform a desk-check on this algorithm using a table to show the values in each variable
after the execution of each line. Assume an input value of 150 for price1 and 100 for price2 and
200 for price3. Note that it uses a literal value of 0.2 for the tax rate.

1. data price1 as whole number


2. data price2 as whole number
3. data price3 as whole number
4. data total as real number
5. output “Welcome to the price calculator”
6. output “What is the first price?”
7. input price1
8. output “What is the second price?”
9. input price2
10. output “What is the third price?”
11. input price3
12. total = (price1 + price2 + price3) + ((price1 +
price2 + price3) * 0.2)
13. output “The total price including tax:”
14. output total
15. output “Thankyou for using this program.”

The maximum number of marks awarded to this question is 10. Award 1 mark per line from
7-14 (up to 8 marks), plus 1 mark for lines 1-4, plus 1 mark for lines 5, 6 and 15.

Lin price1 price2 price3 total notes


e

1 0 0 0 0 price1 declared

2 0 0 0 0 price2 declared

3 0 0 0 0 price3 declared

4 0 0 0 0 total declared

5 0 0 0 0 Output

6 0 0 0 0 Output

7 150 0 0 0 User inputs 150

8 150 0 0 0 Output

9 150 100 0 0 User inputs 100

10 150 100 0 0 Output

11 150 100 200 0 User inputs 200

12 150 100 200 540 Calculate total

13 150 100 200 540 Output

14 150 100 200 540 Output

15 150 100 200 540 Output

Total: 10 Marks

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

a) Explain the difference between primitive data types and object data types when using integers. 5
Most languages implement integer data types as primitive data types (1 mark). They are
used in calculations in the usual way with the standard arithmetic operators (1 mark) and
will be declared as regular variables (1 mark). Object data types will require creation of the
object, and will use methods in order to perform operations on them (1 mark). These will
not work with the normal arithmetic operators (1 mark).

b) Explain why the following data types should use a string data type and not a numeric data type
(such as Integer or float):

i) The staff ID of an employee 3


String because it could be made up of characters (1 mark) and also it is not used a
number in mathematical operation (1 mark), or could have leading zeros (1 mark)
ii) The phone number of an employee 2
String because it will have a leading zero (1 mark) and it will not be used in
calculations (1 mark)

Total: 10 Marks

Marks
Question 5

a) Briefly explain the following components of a bounded loop:

i) Initialisation 1
Initialisation – the counter is given a starting value
ii) Continuation Condition 1
Continuation Condition – the condition under which we stop looping

b) Write a short pseudocode program that will read in exactly 3 prices from the user and calculate 8
the total, displaying the result. The prices should be whole numbers and the calculation should
be completed using a bounded loop.

The number of marks awarded to this question is 8. The code should be something similar
to this:

1. data price as whole number


2. data counter as whole number
3. data total as whole number
4. total = 0
5. counter = 0
6. loop until counter is equal to 3
7. input price
8. total = total + price
9. increment counter
10. next loop
11. output total
12. output “Goodbye!”

Marks should be allocated as follows: 1 mark for using the loop; 1 mark for using a
counter; 1 mark for ending at 3; 2 marks for choosing a bounded loop; 2 Marks for correct
loop contents; and 1 mark for clarity. The pseudocode does not need to be exact but it
does need to clearly solve the problem.

Total: 10 Marks

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

a) Using an ‘if statement’, write a pseudocode algorithm that implements the following rule: 8

If a student’s age is 17 or lower then funding is high; If a student’s age is 18 then funding is
medium; if a student’s age is 19-23 then funding is low; and if a student’s age is 24 or older then
there is no funding.

The result of the’ if statement’ should cause a message regarding funding to be stores in a string
and then output at the end of the algorithm. You should use the following variables: (1) data age
as integer; (2) data funding as string.

The maximum number of marks awarded to this question is 8. Award up to 4 marks for
correct logic and award up to 4 marks for correct if/else structure.

1. If age >= 24 then


2. funding = “zero”
3. else if age >=19 then
4. funding = “low”
5. else if age >=18 then
6. funding = “medium”
7. else
8. funding = “high”
9. End if
10. Output “Given the age of” + age +“, this student will have a” + funding + “level of
funding”

Note: Syntax is not important but structure is.


b) Given your algorithm for part (a), what values would you use in the variable age to adequately 2
test your algorithm?
Award up to two marks for appropriate test values, including boundary tests and zero
tests
Examples include, 15, 16, 18, 19, 20, 23, 24, 25, 0, -1

Total: 10 Marks

Page 5 of 9
Software Development Techniques © NCC Education Limited 2016
Marks
Question 7

a) Below is a partly complete truth table for the logical equation: 10


NOT (A AND B) OR C.

Complete the table.

A B C A AND B NOT(A AND B) NOT (A AND B) OR C

F F F F

F F T F

F T F F

F T T F

T F F

T F T

T T F

T T T

The maximum number of marks awarded for this question is 10. Award ½ marks for each
cell in the last two columns up to a maximum of 8 marks. Award ½ marks for each correct
pair in columns 3 up to a maximum of 2 marks.

A B C A AND B NOT(A AND B) NOT (A AND B) OR C

F F F F T T

F F T F T T

F T F F T T

F T T F T T

T F F F T T

T F T F T T

T T F T F F

T T T T F T

Total: 10 Marks

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

a) Write an algorithm that finds the total price of a set of prices that are stored in an array. The array 10
of prices may be any length so your algorithm will use a function called sizeof() to check the
length of the array.

The maximum number of marks awarded to this question is 10. The code should be
something similar to this:

1. data prices as array of whole number


2. data counter as whole number
3. data total as whole number
4. total = 0
5. counter = 0
6. loop until counter is equal to sizof(prices)
7. total = total + prices[counter]
8. increment counter
9. next loop
10. output total
11. output “Goodbye!”

Marks should be awarded as follows: 1 mark for array declaration; 1 mark for counter and
total declarations; 1 mark for initialising counter and total; 1 mark for using counter for
loop; 1 mark for using the loop; 1 mark for choosing a bounded loop, up to 2 marks for
correct loop contents; and up to 2 marks for clarity.

Note: The pseudocode does not need to be exact but it does need to clearly solve the
problem.

Total: 10 Marks

Question 9

a) Write a Pseudocode program that could be used to implement the bubblesort algorithm. You 10
should include comments explaining the important parts of the algorithm.

1. data sortList as an array of whole number


2. data temp as whole number
3. data passNumber as whole number
4. data i as index
5. loop while passNumber is less than len(sortList – 1)
6. loop while i is less than passNumber
7. if sortList[i] > sortList[i+1]
8. temp = sortList[i]
9. sortList[i] = sortList[i+1]
10. sortList[i+1] = temp
11. end if
12. i = i + 1
13. end loop
14. passNumber = passNumber + 1
15. end loop

The maximum number of marks awarded to the question is 10. It should appear similar to
the algorithm above, but must include calculation for number of passes (2 Marks), correct
use of temporary variable to swap list items (2 marks). Correct use of nested loops (4
marks). Appropriate use of condition (2 marks)

Total: 10 Marks

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

a) Explain the concept of a Class in relation to Object-Orientated Programming. 5

A Class is used to represent a collection of objects in our programme (1 mark). These


things will have data or information stored about them (1 mark) and will perform
operations (1 mark). The class includes member variables to represent the data (1 mark)
and methods to represent the operations that the classes can perform (1 mark).

b) The following class is used to describe objects of type Employee. These objects might appear in 5
a Human Resources system for any organisation. The class contains two accessor functions.

Explain what is meant by accessor functions and how they support information hiding in Object
Oriented Programming.

Class Employee
data name as String
data age as whole number
function setName (needs n as String)
name = n
end function

function getName() returns String


return name
end function
End Class

Accessor functions are used to control access to the member variables of a class, and the
take the form of getters and setters (1 mark) Getters are used to retrieve data form our
class in a controlled manner (1 mark). Setters are used to change (or set) the values of our
member variables in a controlled manner. (1 mark)

The support information hiding by preventing the user of the class from having direct
access to the data within it (1 mark) and by hiding the implementation details of the
member variable (1 mark)

Total 10 Marks

End of Examination Paper

Page 8 of 9
Software Development Techniques © NCC Education Limited 2016
Learning Outcomes matrix

Question Learning Outcomes assessed Marker can differentiate


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

Grade descriptors

Learning Outcome Pass Merit Distinction


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

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

Você também pode gostar