1

MuirfieldHigh School

Year 11

Mid Course Exam

2007

Software Design and Development

Part 1 – Multiple Choice (15 marks)

For each question write the best answer (A, B, C, D) in the space provided on your answer sheet.

1. A program requires the following calculation to be performed

Answer = Total / Count

Where “/” is division and “Total” and “Count” are declared as integer variables. To achieve the most reliable result, the variable “Answer” should be of the type :

A. integer

B. boolean

C. real or floating point

D. double precision integer

2. Most programming languages allow the programmer to create variables. A variable is

A. a numerical value used by the program for calculations and comparisons

B. a memory address for the storage of data

C. a name that represents a sequence of operations

D. a calculation result

3. Syntax errors in a program are usually discovered:-

A. when the program is run

B. when the program is tested

C. when the algorithm is designed

D. when the algorithm is tested

4. The elements of an array called Data are shown below:-

8 / 4 / 10 / 2 / 6 / 4

The data elements are numbered from 1 to 6.

The value of (Data(5) - Data(2)) * Data(6) is

A. -10

B. 0

C. 6

D. 8

5. How many times will the following loop execute?

set Count to 0

WHILE Count <= 0

Add 1 to Count

Display Count

ENDWHILE

A. once only

B. twice

C. an infinite number of times

D. never

6. Which would be the best data structure to store the street address of every person in a class?

A. a data record

B. a file of real data values

C. an array of strings

D. a string of characters

7. Software that is distributed as shareware

  1. is copyright free
  2. is free to copy but still covered by copyright
  3. is designed to be shared between several users
  4. can be used for a limited period only

8. Flowcharts and pseudocode are both

  1. computer languages
  2. used only with simple programs
  3. written instructions for a computer to obey
  4. ways to describe problem solutions

9. Which of the following lists contains examples of algorithm control structures?

  1. boolean, floating point, real
  2. multiway selection, post test repetition, pseudocode
  3. pseudocode, flowchart, Nasi-Schneiderman diagram
  4. repetition, selection, sequence

10. Which of the following algorithms will show all the numbers from 1 to 100?

A / BEGIN program
REPEAT
set counter to 0
display counter
add 1 to counter
UNTIL counter = 100
END program / B / BEGIN program
set counter to 0
WHILE counter < 100
display counter
add 1 to counter
ENDWHILE
END program
C / BEGIN program
set counter to 1
REPEAT
display counter
add 1 to counter
UNTIL counter > 100
END program / D / BEGIN program
set counter to 1
IF counter < 100 THEN
display counter
ELSE
add 1 to counter
ENDIF
END program

11. Which of the following lists contains valid items for an array of 5 real values?

  1. “three”, “nine”, “zero”, “ten”, “eight”
  2. 12.0, 21.5, -15.3, 0.6, 1.0
  3. “seven”, 7, 7.7, 7.7, “77”
  4. “3.0, 3.3, -3.3, 0.33, 33.0”

12. The index to an array..

  1. shows how many items are in the array
  2. identifies an item in the array
  3. indicates the last item in the array
  4. indicates the first item in the array

13. Which of the following data structures allows more than one type of data to be stored?

  1. array
  2. real
  3. record
  4. boolean

14. This line of text is an example of ..

A. an array of characters

B. an array of strings

C. a record data structure

D. a record

15. Internal documentation is

  1. for programmers only
  2. for users only
  3. to provide users with help
  4. manuals and installation instructions

Part 2 – Mixed Choice (10 marks)

16. True/False: Write TRUE (T) or FALSE (F) to each of the following statements in the space provided on the answer sheet. (½ mark each)

  1. a pretest loop must be executed at least once in a program
  2. a binary selection is a decision where there are many different answers
  3. a REPEAT … UNTIL structure is called a pretest loop
  4. a real data value contains a decimal part and an integer part
  5. a sequence is one of the algorithm control structures
  6. an algorithm must solve a problem in a finite time
  7. a syntax diagram describes the rules of a language
  8. a programming object contains both code and data
  9. a software license agreement sets out the users rights and responsibilities
  10. comments in a program code are part of user documentation

17. Match the terms in LIST A with their correct meanings in LIST B. (½ mark each)

List A / List B
1.flowchart / A.a simple data type
2.record / B.instructions for a computer
3.algorithm / C.a structured data type
4.event driven / D.interaction between people and equipment
5ergonomics / E.a made-up name
6control structure / F.a graphical algorithm description
7.program / G.directs the operation of an algorithm
8.character / H. a general list of instructions
9.identifier / I.relies on user inputs or actions
10.syntax / Jrules for a language

Part 3 – Written Answer (15 marks)

Write your answer to the following questions in the spaces provided on the answer sheet.

18. Study the following algorithm.

BEGIN Program

set Counter to 0

WHILE Counter < 10

Print Counter

add 2 to Counter

END WHILE

END Program

What value(s) will be printed by this algorithm ?

19. Arrays are frequently used in algorithms and programs.

i. What is an array?

ii. What is an array element?

iii. Why is an array such a useful data structure?

Answer SheetName ……………………………………….

Place a check mark under the letter that represents the most correct answer

Qu. / A / B / C / D / Qu. / A / B / C / D
1 / 9
2 / 10
3 / 11
4 / 12
5 / 13
6 / 14
7 / 15
8

16 Write True(T) or False(F) in the space provided.

Qu / a / b / c / d / e / f / g / h / i / j
T/F

17 (write the correct letter from list B in the space provided.)

List A / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10
List B

18 :

19 :