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

2012

HIGHER SCHOOL CERTIFICATE


PRELIMINARY EXAMINATION

Software Design and


Development
Section I
Total marks (20)
 Attempt questions 1-20
General Instructions
 Allow about 25 minutes for this section
 Reading time – 5 minutes  Mark your answers on the answer sheet provided
 Working time – 2 hours
Section II
 Write using blue or black pen Total marks (80)
 Write your student number and/or  Attempt ALL questions
name at the top of every page  Allow about 1 hour and 35 minutes for this
section
 Answer in the spaces provided on this paper

STUDENT NUMBER/NAME: ___________________


Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Section I
Total marks (20)
Attempt Questions 1 – 20
Allow about 25 minutes for this section
Use the multiple choice answer sheet
Select the alternative A, B, C or D that best answers the question

1. VisiCalc is an example of which of the following?


(A) Calculator
(B) Spreadsheet
(C) Database
(D) Programming language

2. Today, use of a command line interface (CLI) is most common on which of the following?
(A) Servers
(B) Portable devices
(C) Desktop computers
(D) Web browsers

3. Which of the following lists contains ONLY input devices?


(A) mouse, inkjet printer, graphics tablet
(B) keyboard, laser printer, LCD monitor
(C) barcode scanner, mouse, graphics tablet
(D) wireless router, barcode scanner, keyboard

4. The letter ‘B’ (upper case) is represented by 6610 in ASCII. Which of the following represents
the ASCII code of ‘b’(lower case) in binary?
(A) 1000001
(B) 0100010
(C) 1000010
(D) 1100010

5. Which decimal number is equivalent to the hexadecimal number 2D?


(A) 33
(B) 43
(C) 44
(D) 45

Page 2 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Use the following algorithm to answer questions 6 and 7


BEGIN
A = 15
WHILE A > 1
IF A MOD 2 = 0 THEN Note:
PRINT A A MOD B returns the remainder
A=A–3 from the division A/B.
ELSE For example, 11 MOD 4 = 3
A=A–1 because 11/4 = 2 r3.
END IF
ENDWHILE
END

6. Which control structures are used in the algorithm?


(A) Sequence, pre-test repetition, binary selection
(B) Sequence, post-test repetition, binary selection
(C) Sequence, post-test repetition, multi-way selection
(D) Post-test repetition, Pre-test repetition, multi-way selection

7. What is the output of the algorithm?


(A) 15 12 11 8 7 4 3
(B) 14 11 10 6 5 2
(C) 14 10 6 2
(D) 15 12 8 4

8. Which of the following best defines the term “intellectual property”?


(A) Material covered by copyright law.
(B) The results of mental labour.
(C) The underlying design of products.
(D) Limitations on how a product can be used.

9. Which of the following data types is most appropriate for storing the quantity of fuel
purchased by a customer at a petrol station?
(A) Integer
(B) String
(C) Floating point
(D) Boolean

10. Small multi-skilled teams that are able to respond rapidly to changing specifications are a
feature of which software development approach?
(A) RAD
(B) Structured
(C) Prototyping
(D) Agile

Page 3 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

11. arr is an array and arr(1)=2, arr(2)=1, arr(3)=4 and arr(4)=3.


What does arr(arr(arr(arr(2)))) equal?
(A) 1
(B) 2
(C) 3
(D) 4

12. A random access file contains a list of many hundreds of data items. In terms of data items
accessed, which of the following is required to read the three hundredth data item within the
file?
(A) All data items within the file must be accessed.
(B) Only the three hundredth data item needs to be accessed.
(C) The first three hundred data items need to be accessed.
(D) All data items beginning from the three hundredth data item to the end of the file need
to be accessed.

13. A programmer finds their source code refuses to compile. What is the most likely issue?
(A) Logic errors
(B) Syntax errors
(C) Runtime errors
(D) Incorrect compiler settings

14. Consider the following high-level language statements which are a fragment of a larger
program:
Input firstName(c)
result = (firstName(c) = “Fred”)
What is the most likely data type of the identifiers in this statement?
(A) Both result and c are integers, firstName is an array of strings.
(B) firstName is an array of strings, result is a string, c is an integer.
(C) firstName and result are strings, c is a floating point.
(D) firstName is an array of strings, result is a Boolean, c is an integer.

15. What is the purpose of intrinsic documentation?


(A) To train users to operate the final software product.
(B) To improve the efficiency of the translation process.
(C) To assist developers when building or maintaining source code.
(D) To ensure that each variable uses a different identifier.

Page 4 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Consider the following algorithm when answering questions 16, 17 and 18.
BEGIN sub1(a, b)
c=b
WHILE sub2(a) > b
d = sub3(b)
IF d THEN
e = sub4(c)
Add e to c
END IF
ENDWHILE
RETURN c
END
16. With regard to the data returned from each subroutine, which of the following is TRUE?
(A) sub1, sub2, sub4 return numbers, sub3 returns a Boolean value.
(B) sub1, sub2 return numbers, sub3 and sub4 return Boolean values.
(C) sub1 returns a number, all other subroutines return Boolean values.
(D) All subroutines return numbers.

17. Ignoring parameters, which structure chart best reflects the above algorithm?
(A) Sub1 (C) Sub1

Sub2
Sub2 Sub3 Sub4

Sub3 Sub4
(D) Sub1

(B) Sub1
Sub2

Sub2 Sub3 Sub4 Sub3 Sub4

18. Although the purpose of the above algorithm is unclear, there is sufficient detail to determine
that a logic error is present. Which of the following best describes the logic error?
(A) The loop counter is not incremented within the body of the loop so the iteration will
continue indefinitely.
(B) A complete lack of intrinsic documentation with regard to meaningful variable names
means it is inevitable that multiple logic errors are present.
(C) The lines d = sub3(b) and e = sub4(c) are incorrect as in each case it is unclear which
parameter is input to the subprogram and which parameter is output from the
subprogram.
(D) The loop is either infinite or will not be executed at all because neither a or b are altered
within the body of the loop.

Page 5 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

19. What is the name of the systems documentation which shows user interface designs and
navigation links between screens?
(A) dataflow diagram
(B) IPO diagram
(C) storyboard
(D) system flowchart

20. Consider the following fragment of code:


A=A+B
B=AB
A=AB
Assuming A and B are integers, what is the effect of executing this sequence of statements?
(A) Both variables are set to the initial contents of A.
(B) Both variables are set to the initial contents of B.
(C) The contents of A is swapped with the contents of B.
(D) Both variables are set to the initial difference between A and B.

Page 6 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Section II
Total marks (80)
Attempt ALL Questions
Allow about 1 hour and 35 minutes for this section
Answer in the spaces provided on this paper.
If you include diagrams in your answer, ensure they are clearly labelled.

Question 21. (4 marks) Marks


In a programming language identifiers must use at least two characters. The first character
must be the letter A, B, C or D. The second and any subsequent characters must be digits
(0, 1, 2, 3... 9).

(a) Write EBNF expressions to define an identifier in this language. 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(b) Draw railroad diagrams to define an identifier in this language. 2

Question 22. (3 marks)


Distinguish between public domain software and open source software. 3
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Page 7 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 23. (10 marks) Marks


Define each of the following elements of computer systems and provide examples.

(a) Hardware 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(b) Software 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(c) Data 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(d) Procedures 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(e) Personnel 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

Page 8 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 24. (4 marks) Marks


Required skills in software design and development include communication skills and the
ability to work in teams. Identify TWO other skills and explain why they are important to 4
software development.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Question 25. (3 marks)


Inclusivity is the need for software to not exclude individuals or groups based on specific
characteristics. Describe TWO ways in which developers can ensure their software does 3
not exclude people of different cultural backgrounds.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Page 9 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 26. (4 marks) Marks


The operating system performs functions critical to the running of computer systems.
4
Describe the functions performed by operating systems.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Question 27. (3 marks)


Compare and contrast machine code and assembly language. Provide an example of each
to assist your response. 3

________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Page 10 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 28. (10 marks) Marks


Identify essential features of each of the following software development approaches.

(a) Structured approach 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(b) Agile approach 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(c) Prototyping approach 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(d) Rapid application development (RAD) approach 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(e) End user approach 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

Page 11 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 29. (9 marks) Marks


Power Accounting wishes to introduce new software for the billing of clients. The
desired features of the program include:
 The software should have the ability to read from an existing database of clients.
 Accountants should be able to enter the hours worked and the type of work
performed for each of their clients.
 Accountants should be able to print or email invoices to clients.
 Secretarial staff at the firm will be able to enter payments when they are received.
 Secretarial staff will be able to print lists of clients with overdue invoices.

(a) List the required inputs to the new software. 2


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

(b) List the required outputs from the new software. 2


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

(c) Recommend and justify an appropriate software development approach for this
5
new software. In your response briefly address why other approaches are not
suitable.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Page 12 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 30. (4 marks)


The following algorithm draws a pattern of lines on the screen.

BEGIN linePattern (space)


width = screen width in pixels
height = screen height in pixels
c = space
x = width/2
y = height/2
WHILE x-c>0 AND x-space<width AND y-space>0 AND y+c<height
Draw line from (x,y) to (x, y+c)
Draw line from (x, y+c) to (x-c, y+c)
Draw line from (x-c, y+c) to (x-c, y-space)
Draw line from (x-c, y-space) to (x+space, y-space)
x = x + space
y = y - space
c = c + (2 * space)
ENDWHILE
END linePattern

Using the screen template below draw the pattern of lines produced by the 4
statement linePattern(100). Label significant coordinates on your pattern of lines.

(0, 0) (640, 0)

(0, 480) (640, 480)

Page 13 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 31. (10 marks) Marks


Recommend and justify a suitable data type and/or data structure for each of the following
situations.

(a) Keeping track of the number of times a data input has been made by the user. 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(b) Storing the average of a series of timed events. 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(c) Recording the date, time and user’s name each time a software application is 2
executed.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(d) Recording occupied seats within a theatre booking system. 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(e) Temporarily recording a sequence of numbers to simplify processing. 2


___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

Page 14 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 32. (5 marks) Marks


Consider the following algorithm.
BEGIN NiceYippee
count = 3
WHILE count < 40
by3 = count is divisible by 3
by5 = count is divisible by 5
IF by3 AND by5 THEN
Print “Yippee”
ELSE
IF by3 THEN
Print “Nice”
ELSE
Print count
ENDIF
ENDIF
Add 4 to count
ENDWHILE
END NiceYippee
1
(a) Identify a nested selection statement within the above algorithm.
___________________________________________________________________
___________________________________________________________________

(b) Complete a deskcheck of the NiceYippee algorithm. 4


count by3 by5 Output

Page 15 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 33. (11 marks) Marks


Peasant multiplication is an ancient method of multiplication which does not require
people to memorise their times tables. The algorithm for peasant multiplication is
somewhat similar to that used by modern computers to perform binary multiplication and
division.
Here is an example of peasant multiplication used to calculate 13 times 14 (which gives the
result 182).

Step 1.
Step 2.
Halve (ignoring
Keep doubling down to
remainders) down the first
fill the second column.
column until you get to 1. 13 14
6 28
Step 3. 3 56 Step 4.
Cross out all rows where 1 112 Add all the remaining
an even number appears 182 numbers in the second
in the first column. column to get the answer.

(a) Perform the following multiplications using the method of peasant multiplication
described above. Show all working.

(i) 12 × 4 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

(ii) 18 × 16 2
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________

Page 16 of 17
Software Design and Development 2012 Preliminary Exam Student Name/Number:...........................................

Question 33. (continued) Marks

(b) Write an algorithm in pseudocode for peasant multiplication. 7

END OF EXAMINATION

Page 17 of 17

You might also like