Computing (Modular)
CP1
June 2006
(1.5 Hours)
[1] | It is important that the Human-Computer Interface (HCI) of
any computer system is well designed. Give two reasons why this is important. |
[2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[2](a) | A program contains an error where a command word is
accidentally left out. |
|||||||||||||||||||||||||||||||||||||||||||
(i) | What is the name for this type of error? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | Give another example of this type of error, other than where a command word is left out. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(b) | The following statement is a part of another program:
FinalValue = Input1 / Input2 |
|||||||||||||||||||||||||||||||||||||||||||
(i) | State a circumstance under which this statement could contain a logical error. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | State a circumstance which will cause an execution error when this statement is executed. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(c) | Errors are often located and resolved during program
maintenance. |
|||||||||||||||||||||||||||||||||||||||||||
(i) | What is the name of the type of maintenance where errors are located and resolved? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | Explain what is meant by the term perfective maintenance, giving one example where it might be necessary. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iii) | Name and describe one other type of maintenance. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[3](a) | Documentation is particularly useful to a programmer who wishes to make changes to an existing computer program. Give two reasons why good documentation is important in this case. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(b) | State one other type of documentation. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[4] | A local council is researching the use of public transport
and how this use is affected by weather conditions. A certain bus is
timetabled to leave the town bus station daily at 8:15 am. Each day,
researchers note the number of passengers on the bus as it leaves,
together with the temperature and other data. |
|||||||||||||||||||||||||||||||||||||||||||
(i) | What data type would be most suitable for storing the number of passengers? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | What data type would be most suitable for storing the temperature. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iii) | Name an item of data from this research which would most sensibly be stored in a boolean data type. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iv) | Each month,, all this data is keyed into a computer system
for analysis. A rogue value is used during
the input of the passenger number data.
Describe the purpose of a rogue value and suggest a value for it in this case. |
[2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[5] | A firm stores data about its customer accounts on its
computer system in a particular order. |
|||||||||||||||||||||||||||||||||||||||||||
(i) | What name is given to the process in which data items are put into order? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | Why might it be useful to the firm to store the data in order. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[6] | A mobile phone company employs people to sell phone
contracts to members of the public in the street. Sales
data for each salesperson each month are recorded as shown below: |
|||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(i) | What is the full name for this type of data structure? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | State the circumstances under which it would be better to store data in a record, rather than in the above data structure. Give an example of data (related to the phone company staff) which should be stored in a record. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[7] | It is often necessary to choose whether to develop an
application using a programming language or using a software package. |
|||||||||||||||||||||||||||||||||||||||||||
(i) | There are various types of programming languages, for instance high-level and low-level languages. Explain the difference between high-level and low-level languages. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | Not all high-level languages are designed for the same purpose. Give an example of an application which might sensibly use programs written in a scientific language. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iii) | If the decision is made to develop the application using a
software package, extensive use may be made of macros and data
portability.
Giving an example in each case, explain
what is meant by: |
|||||||||||||||||||||||||||||||||||||||||||
(I) | a macro; | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(II) | data portability. | [2] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iv) | State one advantage that the use of a software package is likely to have over the use of a programming language. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[8] | NanniesDirect is an agency
which helps parents in a certain town to find a suitable person to look
after their children. People who wish to work as nannies can apply to NanniesDirect,
who check on a national register of nannies before interviewing the
person. If all is satisfactory, the person's name is added to NanniesDirect's
own register.
The diagram below illustrates the situation described. |
|||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(i) | What name is given to this type of diagram? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | What type of object does the open box represent? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iii) | Draw the shape used in the diagram to represent an external entity? | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(iv) | Give a suitable name for the object shown as a in the diagram. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(v) | Give a suitable name for the object shown as b in the diagram. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(vi) | Give a suitable name for the object shown as c in the diagram. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(vii) | Give a suitable name for the object shown as d in the diagram. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[9] | Lliwedd College runs a one-year course for students
consisting of six modules. At the end of the course students are awarded
a Distinction, a Merit
or a Pass, or they may fail.
The algorithm used is shown below: |
|||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(i)(I) | Write down the output for a student who passes 6 modules with a mean mark of 66. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(II) | Write down the output for a student who passes 4 modules with a mean mark of 66. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(III) | Write down the output for a student who passes 5 modules with a mean mark of 54. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(IV) | Write down the output for a student who passes 6 modules with a mean mark of 72. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(ii) | The algorithm above is correct. Assume now that it is incorrectly
copied so that the word "else" is omitted from statement 7 as
shown below. |
|||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(I) | Write down all the output which the incorrect algorithm will give for a student who passes 6 modules with a mean mark of 66. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
(II) | Write down all the output which the incorrect algorithm will give for a student who passes 4 modules with a mean mark of 66. | [1] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[10] | Describe in detail how a binary search works, using a diagram if you wish. | [3] | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
[11] | In the following question,
additional credit (up to 3 marks) will be gained if your answer
demonstrates skill in written communication.
A software house has been asked to develop a complex suite of programs for a bank. Before writing the program, it is necessary to carry out a requirements analysis and produce a requirements specification. The programmers then intend to use a top-down design method, and use standard modules where possible. Describe in detail what is meant by the terms requirements analysis and requirements specification and give a detailed explanation why the software house might choose to use a top-down design method and standard modules. |
[9+3] | ||||||||||||||||||||||||||||||||||||||||||
A requirements analysis is an investigation into the
current problems that the bank may be having and what the bank needs the
new suite of programs to do. This can be done by interviewing the managers
or staff that work in the bank, by using questionnaires and analysing the
results, by observing the current practices or by reading existing
documentation.
The requirements specification would report on what the programs would need to do - what data would need to be input, what data processing needs to be carried out and what outputs are required. If there is a database used, then the structure and format of the data would also need to be specified. A budget and time plan may also be included. A top-down design method would break a large task into successively smaller tasks. Small tasks are easier to develop, test and debug than large programs and would speed up the process of writing the programs. Standard modules are previously written subroutines that can be used in the new programs. These have already been tested and should work reliably in the new programs. Using previously written subroutines would speed up the process of program development and mean fewer errors.
|
||||||||||||||||||||||||||||||||||||||||||||