Computing (Modular) 
 CP1
June 2007
(1.5 Hours)
| [1] | Two different types of programming errors are syntax errors and logical errors. Explain each of these terms, giving one example in each case. | |||||||||||||||
| (i) | syntax error | [2] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | logical error | [2] | ||||||||||||||
  | 
      ||||||||||||||||
| [2] | Data is held about the cars for sale at a car dealership.
         In each case, name the most suitable
        data type for the storage of the following data:  | 
      |||||||||||||||
| (i) | the model name for the car, for example Fiesta; | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | the number of doors, for example 4; | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iii) | the average miles per gallon achieved by the car, for example 38.4; | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iv) | whether or not the car is new, for example TRUE; | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (v) | a single letter code for whether the fuel used is petrol, diesel or other, for example P. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [3] | A systems analyst uses various methods to find out how an
        existing system works. These include: 
  | 
      |||||||||||||||
| (i) | Describe one advantage of using interviews over questionnaires. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | Describe one advantage of using questionnaires over interviews. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iii) | The systems analyst may also find it useful to use the
        existing system or observe the existing system in use.
         Describe one other method which the systems analyst can use to find out about an existing system.  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [4](a) | Computer programs need to be well documented.
         State two types of documentation, in each
        case stating whom it would be written for.  | 
      [2] | ||||||||||||||
  | 
      ||||||||||||||||
| (b) | Well written computer programs often contain different
        types of self-documentation.
         Describe two types of
        self-documentation.  | 
      [2] | ||||||||||||||
  | 
      ||||||||||||||||
| [5] | A taxi firm asks each driver to record the following
        information each time the taxi is hired:
        
 The taxi firm then enters the data into a computer program. 
  | 
      |||||||||||||||
| (i) | A rogue value is used in this
        data. | 
      |||||||||||||||
| (I) What is the purpose of a rogue value? | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| (II) Which of the three data items being input in this
        case is most suitable for a rogue value? | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| (III) Give a suitable rogue value in this case. | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| (ii) | Name a data structure which could contain all three items
        of data for one journey as a single item. | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [6](a) | Using a clearly labelled diagram,
        explain how a binary search is used to
        locate an element in an array. | 
      [3] | ||||||||||||||
  | 
      ||||||||||||||||
| (b) | Another type of search is the linear
        search. | 
      |||||||||||||||
| (i) | State one situation in which
        it would be essential to use a linear search rather than a binary
        search. | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | Give another situation in which either type of search
        could be used, but where it would probably be more sensible to use a
        linear search. | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [7] | The secretary of a small social club makes use of an
        integrated package to communicate with the club's members.
         
  | 
      |||||||||||||||
| (i) | Explain the term mail-merge
        and give an example to show how the secretary might use mail-merge. | 
      [3] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | The secretary sometimes uses a feature of the integrated
        package which allows a small set of instructions or keystrokes to be
        recorded for later use. | 
      |||||||||||||||
| (I) What is the name given to this feature? | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| (II) Describe one way in
        which this set of instructions or keystrokes can be run. | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| (III) Give an example of how the secretary might make use
        of this feature. | 
      [1] | |||||||||||||||
  | 
      ||||||||||||||||
| [8] | The river flowing through a certain city floods
        occasionally, causing widespread damage. The river authority monitors
        the water level in the river hourly, and when necessary issues either a standard
        warning or a high-priority warning.
        The data used include both the current river level and the increase in
        river level during the last hour.
         The algorithm used is shown below:  | 
      |||||||||||||||
        
  | 
      ||||||||||||||||
| (a)(i) | State what the output will be when the inputs are:
         RiverLevel = 13 Increase in river level during the last hour = 2  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (ii) | State what the output will be when the inputs are:
         RiverLevel = 9 Increase in river level during the last hour = 0  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iii) | State what the output will be when the inputs are:
         RiverLevel = 11 Increase in river level during the last hour = 0  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iv) | State what the output will be when the inputs are:
         RiverLevel = 7 Increase in river level during the last hour = 4  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (b) | The algorithm on the opposite page is correct. However, it
        is accidentally entered incorrectly, so that the word  OR in line 5 is
        changed to  AND
         Line 5 now becomes:  | 
      |||||||||||||||
  | 
      ||||||||||||||||
One of the parts (a)(i) to (iv) now gives a different output. State which part gives a different output and write down what the output will now be.  | 
      [2] | |||||||||||||||
  | 
      ||||||||||||||||
| [9] | A building firm buys items (such as windows and doors)
        from BuildRight, a local builders' merchant. BuildRight carry a large
        amount of stock. Sometimes, however, an item is out of stock at
        BuildRight, and staff at BuildRight then check if it is available from a
        national supplier.
         The situation described is shown below:  | 
      |||||||||||||||
| 
         
  | 
      ||||||||||||||||
| (i) | What type of object does the following shape represent? | 
      [1] | ||||||||||||||
| 
         
  | 
      ||||||||||||||||
  | 
      ||||||||||||||||
| (ii) | Give a suitable name for the object shown as a in the diagram. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iii) | Give a suitable name for the object shown as b in the diagram. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (iv) | Give a suitable name for the object shown as c in the diagram. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (v) | This type of diagram shows the flow of data in a computer system. Why is it important to show data flow? | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [10](a) | A certain programming language is very good at handling
        complex calculations. Describe an application which could sensibly be written in this type of programming language.  | 
      [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (b) | Describe one feature which it would be useful to have in a programming language used in a commercial application. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (c) | Many computer programs use iteration. What is meant by the term iteration? | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| (d) | Explain the difference between a global variable and a local variable. | [2] | ||||||||||||||
  | 
      ||||||||||||||||
| (e) | Describe the function of a translation program when applied to a source program. | [1] | ||||||||||||||
  | 
      ||||||||||||||||
| [11] | In the following question,
        additional credit (up to 3 marks) will be gained if your answer
        demonstrates skill in written communication.
         When a new computer system is being developed, the designers need to take into account a number of issues. One of these issues is maintenance. It is very important that the programs in the new computer system can be maintained. Describe in detail the different types of program maintenance which may be necessary, giving an example in each case. Another issue is the human computer interface (HCI) which needs to be suitable for both experienced and novice users. It should be accessible to people with physical handicaps. Describe in detail what features you would expect to find in a well designed HCI.  | 
      [9+3] | ||||||||||||||
      Perfective maintenance is carried out on a system to
      try to improve it. An example would be re-writing a program to make it run
      faster.
       Corrective maintenance would be needed to correct any problems in the system, such as programs that crash under certain circumstances. Adaptive maintenance would involve changing a system to meet the changing circumstances of the business, such as opening new branches. In order for the HCI to be usable by novice users, an intuitive and user-friendly method of selecting and running applications would be needed such as a GUI - a graphical user interface that uses a mouse pointer to click on small icons representing applications. A command line interface may be optional for expert users where complex commands can be entered, or batch programs that run a sequence of instructions. People with physical handicaps may need speech interface, where commands can be spoken into a microphone. 
  | 
      ||||||||||||||||