|
|||||||
|
|
|
|||||
|
|
|||||||
December 1999 SECTION A [40 Marks] |
Click here to access other
sections Section B Front Cover SUGGESTED SOLUTIONS |
|
Answer ALL questions in this section
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. | For each of the following
stages of the System Life Cycle, give two notations that are used during
the stage:
a) System Analysis [2] Any two of the following: b) Program Design [2] Any two of the following: . |
[4] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. | State whether
each of the following statements is True or False:
a) A procedure must always return one or more values to the calling module or program. [1] False b) Variable parameters are not changed by the procedures which use them [1] False c) Local variables can only be accessed by the procedures that declare them [1] True d) A linked list implemented using pointers is an example of a static data structure where the size of the data structure can change as the program runs [1] False e) Elements in an array are accessible only through their indexes/subscripts [1] True
|
[5] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. | The following
segment of pseudocode is intended to show the logic of the Improved
Bubble Sort algorithm. Flag is a boolean variable that is used to control
the number of passes taking place. Once all the items are sorted, the
sorting process will terminate.
State what values - either true or false - should be used in locations (a), (b), (c) and (d). [4] DO a) True [1]
|
[4] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. |
a) The following fragment of JSP is not drawn correctly. Modules C and D should be within a selection construct depending on the condition C1. Explain the error in the diagram and give a corrected version. [5]
Correct diagram
Correct second level by making use of X module [2][Award 1 mark if modules C and D are from B module] Correct third level [regardless whether from X or B module] [1] b) The following fragment of JSP is also not drawn correctly. It is intended that function 1 should be carried out before the selection condition is evaluated. Explain the error in the diagram and give a corrected version. [5] Error: There should not be any function number [in module A] [1] if the module contains some other sub-modules [1] Correct diagram:
Correct second level by making use of X module with
function number 1 [1]
|
[10] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. | The Personnel
Department of XYZ Hospital has adopted a scheme of promotions for its
assistant nurses (AN) and staff nurses (SN). It is based on the following
rules:
R1 - If an AN has > 5 years working
experience, they should be promoted to senior AN Copy the decision table below to your answer booklet and complete it, based on the information given. [Note: Make sure you use the correct notation] [4]
Correct entry of entire column of R1 [1]
|
[4] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6. |
List four factors that greatly affect the ease of program maintenance. [4] Degree of program structure [1]
|
[4] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7. |
a) State the main difference between High Level Languages and Fourth Generation Languages. [2] High Level Language: A procedure-oriented language [1] b) State four different applications of Fourth Generation Languages. [4] Database query language [1]
|
[6] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8. |
State the level of correctness that can be achieved for a multiplication instruction, based on the following testing schemes: a) Multiply 3 * 4 and check that the result is 12. [1] Possible correctness b) Every possible pair of numbers is tested for both operands. [1] Absolute correctness c) Several values are tested, including the obvious problem values such as zero, largest positive and negative numbers and so on. [1] Probable correctness |
[3] |