100% found this document useful (2 votes)
523 views8 pages

SDT Spring Exam 2023 QP Final

This document provides a timed assessment paper on software development techniques. It consists of 7 questions testing knowledge of topics like object-oriented programming, data structures, testing methods, software development lifecycles, arrays, searching and sorting algorithms. The paper is 4 hours long and worth a maximum of 100 marks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
523 views8 pages

SDT Spring Exam 2023 QP Final

This document provides a timed assessment paper on software development techniques. It consists of 7 questions testing knowledge of topics like object-oriented programming, data structures, testing methods, software development lifecycles, arrays, searching and sorting algorithms. The paper is 4 hours long and worth a maximum of 100 marks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Software Development Techniques

15th March 2023

Time-Controlled Assessment Paper


Answer ALL questions.

Clearly cross out surplus answers.

Time: 4 hours

The maximum mark for this paper is 100.

Any reference material brought into the examination room must be


handed to the invigilator before the start of the examination.
Answer ALL questions
Marks
Question 1

Question 1 is about objects and object-oriented classes.

The class Fruit has the following class variables:

Name as a String
IsBitter as Boolean
Colour as String

a) Write a constructor method for the class Fruit that initialises all THREE (3) 5
variables. You must write your code in pseudocode only.

b) Write an accessor method for the class Fruit that queries the Colour of a fruit. You 3
must write your code in pseudocode only.

c) Write the pseudocode that sets the Colour attribute of object Apple of type Fruit to 2
green. Assume that the object Apple is already created.

Total 10 Marks

Question 2

Question 2 is about data structures Queue and Stack.

a) A word processor can carry out operations such as editing, deleting and adding text. It
can also undo them in the order they are carried out.

i) Identify the data structure most suitable for the word processor to undo 1
operations.

ii) Explain how undo works using the data structure you identified. 3

b) The numbers 1, 2, 3 and 4 are pushed onto a stack data structure in that order, i.e.,
first number 1 and last number 4.

i) What number is at the bottom of the stack? 1

ii) What number is at the top of the stack? 1

Question continues next page

Page 2 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
iii) TWO (2) numbers are popped from the stack, one after the other. 1

The TWO (2) numbers are multiplied, and the result is pushed onto the stack.

What numbers are now on the stack, starting from the top of stack.

c) The numbers 1, 2, 3 and 4 are put in a queue data structure in that order, i.e., first
number 1 and last number 4.

i) What number is at the end of the queue? 1

ii) What number is at the start of the queue? 1

iii) TWO (2) numbers are taken from the queue, one after the other. 1

The TWO (2) numbers are multiplied, and the result is put in the queue.

What numbers are now in the queue, starting from the start of queue.

Total 10 Marks

Question 3

Question 3 is about various testing methods.

a) A function has been written which only accepts a whole number as a single
parameter.

The valid numbers are expected to be between, and including, -5 and 10. However,
zero is not accepted as a valid number.

i) What values would you use to test for transition in values (maximum 2)? 2

ii) What values would you use to test for extreme values (maximum 2)? 2

iii) What values would you use to test for numbers that are not valid numbers 3
(maximum 3)?

b) In Question 3b) you need to describe the main features of THREE (3) types of test
methods.

i) Describe the main feature of Desk-checking method. 1

ii) Describe the main feature of Blackbox testing method. 1

iii) Describe the main feature of Boundary testing method. 1

Total 10 Marks

Question continues next page

Page 3 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
Question 4

Question 4 is about software development life cycle.

a) The Requirements stage of the Software Development Life Cycle (SDLC) is the 4
first stage of this cycle and the cheapest to complete. Explain what is produced in
the Requirements stage. Then, identify the most expensive stage and state why it
is the most expensive?

b) The Iterative Waterfall lifecycle development model is a later version of the 3


original Waterfall model.

Explain what feature of the original Waterfall model makes it inflexible.

Explain how the ‘iterative’ version gets round this inflexibility and why this may be
needed.

c) State THREE (3) weaknesses of the Iterative Waterfall model of software 3


development.

Total 10 Marks

Question 5

Question 5 is about loops in programs.

A program is required to add together a sequence of positive whole numbers input by the
user. This repeats until the user enters a negative number.

You have been asked to design the program using a loop.

You must first decide whether to use a bounded loop or an unbounded loop.

a) Explain which type of loop you should use for the above program and why. 2

b) Design the loop in the above program using pseudocode. 7

You need to declare any variables needed.

c) State ONE (1) advantage of using a loop in this case. 1

Total 10 Marks

Question continues next page

Page 4 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
Question 6

a) A two-dimensional array of whole numbers has TWO (2) indices.

The first index is 10 and the second index is 350.

i) How many elements does this array have? 2

You must show how you calculated the answer.

ii) You wish to assign a value to the last element of this array. Note that both 2
the row and the column indices start from ZERO (0).

What value would you use as the row index?

What value would you use as the column index?

b) Question 6b) is composed of FOUR (4) multiple choice questions.

Each question has FOUR (4) choices.

You should choose only ONE (1) as the correct answer.

i) White-box testing 1

▪ Is another name for unit testing

▪ Is used to uncover errors in flow of logic

▪ Checks that the pseudocode programs have their lines numbered

▪ Ensures pseudocode programs include comments

ii) We call a function to 1

▪ Communicate with it

▪ Reduce the complexity of our program

▪ Use or execute it

▪ Reuse it

Question continues next page

Page 5 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
iii) The quick sort 1

▪ Is a fast sorting method

▪ Has big O notation O(n2)

▪ Requires ordered list to work

▪ Is best for sorting small data sets

iv) An object 1

▪ Is an instance of a class

▪ Has data type integer

▪ Has default value of zero

▪ Is a keyword

c) Complete the following sentences.

i) Classes have both variables for data and ………… for algorithms. 1

ii) Objects when first declared contain ………… value. 1

Total 10 Marks

Question 7

Question 7 is about searching and sorting algorithms.

a) An algorithm is searching an array for a number that is stored in the array. The 3
algorithm is using linear search method.

Describe the main steps the algorithm goes through until it locates the number.

b) Consider the linear search in a) above and answer the following questions

i) The average case of number of searches is 1200. What is the size of this 1
array?

ii) What is the worst case of number of searches? 1

iii) What is the Big O notification for linear search? 1

Question continues next page

Page 6 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
c) Fill in the missing words in the following sentences.

i) Binary search begins by first picking the ………… of the array. 1

ii) The big O notation O(n2) belongs to ………… sort algorithm. 1

iii) Sorting numbers starting with the smallest to the largest is called sorting in 1
………… order.

iv) Bubble sort checks adjacent pairs and ………… them if they are not in 1
required order.

Total 10 Marks

Question 8

Question 8 is about selection and Boolean logic.

a) The following questions are about if statements.

i) What do you call an if statement within an if statement? 1

ii) Convert the following description into a single pseudocode if statement. 2

var 1 and var 2 identify TWO (2) variables

var1 is assigned the value of ZERO (0) if var2 has a value higher than
ZERO (0).

If var2 is not higher than ZERO (0), then var1 is assigned the value of 1.

b) The following question is about Boolean logic. 3

What is the outcome of the following logical operations?

A P = A AND FALSE Q = P OR FALSE R = NOT Q

TRUE

c) The following questions are about truth tables.

i) Explain what a truth table represents 2

ii) Draw the truth table for the OR logic. 2

Total 10 Marks

Question continues next page

Page 7 of 8
Software Development Techniques © NCC Education Limited 2023
Marks
Question 9

a) We often develop algorithms in pseudocode.

i) State TWO (2) differences between pseudocode and programming 2


languages.

ii) “Pseudocode programs should have their lines numbered” 1

State ONE (1) reason why the above statement is a useful advice.

b) This question is about functions in programs.

i) What is a function? 1

ii) State TWO (2) advantages of functions. 2

iii) Describe how a function can receive data from the main program. 1

iv) Describe how a function can pass data to the main program. 1

c) “It is a good practice to include comments in programs”. 2

Give TWO (2) reasons why commenting programs is a good practice.

Total 10 Marks

Question 10

Question 10 is about different data types.

An application to register patients’ details for a local surgery is required to hold 10


the following information for each patient: Name, YearOfBirth, weight (to TWO
(2) decimal places), gender (M or F) and status (married or not married). The
application needs to assign variables to store the above information for each
person.

Determine what data type each of the above variables should be and state the
reason for choosing each type.

Total 10 Marks

End of paper

Page 8 of 8
Software Development Techniques © NCC Education Limited 2023

You might also like