HKCEE Computer Studies Paper I (1986)                                28-02-1997
-------------------------------------------------------------------------------
1. (a) i. Pascal's Adding Machine                                       [1] x 6
          main uses : (any one of the following)
             - used toothed wheels to perform addition / subtraction
             - carry-overs were possible in a way that a fully revolution of
               any wheel caused the next wheel to advance on digit
          impacts : (any one of the following)
             - improved by Leibnitz in 1671 who invented a machine which would
               do +-*/
             - its principle was employed in the later adding machine, cash
               registers and desk calculator

      ii. Jacquard automatic loom :
          main uses : (any one of the following)
             - used punched cards to control weaving patterns
             - a sequence of cards (the program) controlled the lowering and
               raising of threads in the operation of weaving a complete piece
               of material by the loom.
          impacts : (any one of the following)
             - ideas was used by present day punch cards
             - concept of programming

     iii. Herman Hollerith's machine :
          main uses : (any one of the following)
             - an electro-mechanic machine used in the 1890 American Census
               which could tabulate data rep'd by holes punched into a card.
             - with the ehlp of it, the census was completed in less than 3 yrs
          impacts : (any one of the following)
             - ancestor of the later punched card sorter

   (b) i. pulse rate, blood pressure, symptoms (any 2)                 [2]
       ii. the doctor                                                  [1]
       iii. 1. diagnosis / what the patient is suffering               [1]
            2. treatment                                               [1]
       iv. the card                                                    [1]

2. (a) i. during the instruction fetch cycle,
          the CPU fetches the next instrution                        [1]
          addressed by the program counter.                          [1]
      ii. during the execution cycle, the instruction is
          decoded                                                    [1]
          and the specified action is performed                      [1]
   (b) i. either opn code   operand   or opn code   operand
                 -------------------     -------------------
                 0010     0000 1110      0010     0000 1111
                 0011     1000 0000      0011     1000 0000
                 0010     0000 1111      0010     0000 1110
                 0011     0000 1110      0011     0000 1111
                 0010     1000 0000      0010     1000 0000
                 0011     0000 1111      0011     0000 1110          [4]
        ii. 2^4 = 16                                                 [2]
        iii. 2 advantages :
               1. more operation codes are allowed                   [1]
               2. more memory locations may be expressed             [1]

   (c)   A - 4       *1 - O        * Given
         B - 7       *2 - C
        *C - 2        3 - H
         D - 11       4 - A
         E - 9        5 - J
         F - 13       6 - I
         G - 12       7 - B
        *L - 10       8 - K
         H - 3        9 - E
         I - 6      *10 - L
         J - 5       11 - D
         K - 8       12 - G
         M - 13      13 - F
         N - 14      14 - N
        *O - 1       15 - M                                          [12]

3. Flow chart (see copy)

4. (a)  61     0011 1101

        24     0001 1000
       -24     1110 1000

        61     0011 1101
       -24  +) 1110 1000
            -------------
            1  0010 0101                     [3]

   (b)   1011 0010
      +) 1010 0011
      -------------
         0101 0101     [1]

         Invalid answer.     [1]
         Overflow occurs.

      or The denary equi of the operation :   [1]
         -78 + -93 = -171
         -171 falls outside the allowed range -128 to +127

      or Addition of 2 -ve no.s cannot give rise to a +ve no.

   (c) The largest integer : 2^15 - 1 = 32767 = 0111 1111 1111 1111    [1+1]
       The smallest integer : -2^15 = -32768 = 1000 0000 0000 0000     [1+1]

   (d) 1010 0101 1110 = 5136 (oct)
            or        = A5E  (hex)        [1]
       easier to handle by human beings   [1]

5. (a) 1. name
       2. address
       3. date of birth / age
       4. year of entry into ass'n
       5. code for way of payment (autopay / cash)     [5]

   (b) i. any two
          1. name field must be alphabetic
          2. address field must be alphanumeric
          3. if DOB is designed to be numeric then
                day   range  : 1..31
                month range  : 1..12
                day entry should be consistent with month
                age +ve no.

          4. year of entry into assn must be numeric
          5. year in which last payment was made must be numeric
          6. code for way of payment must be alphabetic or numeric
             according to the design of the program                [4]

       ii. test data :   name : Chan Siu Wa*
                         date of birth : 48/15/AB
                         or any other acceptable test data         [2]
   (c) The keypunch operator made a mistake in the data preparation stage.
       eg. the char '8' is misinterpreted as 3 and hence mispunched as
           an input data.                                          [1]

6. (a) 1. pages of text can be created and corrected very easily.
       2. once the text is created, it can be stored, retrieved
          and modified at any time.                                [2]
   (b) any two                                                     [2]
       - the text may be printed leaving an equal margin on either side.
       - insert : char , ... may be inserted
       - delete : char, words, lines or paragraphs may be deleted.
       - left justisfication - the 1st char of every line lies on the
                               same vertical column.
                               right justification or both.
       - search
       - replace
       - paragraphs may be moved around
       - has form fitting ability
       The following features are also considered : centering & justification

   (c) any two         [2]
       - electronic mail
       - electronic filing system
       - electronic calendar (for arranging appointment)
       - electronic messaging
       - transmission of doc and pictures
       - computer conferencing
       - sharing of info / database
       - sharing of hardware facilities

   (d) advantages : any 4    [4]
       - from the employee's perspective saves time and money because
         there is no need to commute to work
       - employer not affected by high rent
       - absence of role conflict and peer pressure
       - working atomsphere more relaxed because of working at home
       - no interruption coming from other staff members
       disadvantages : any 2  [2]
       - loses human contact because spends time in front of terminal all time
       - may be disturbed by other members of the household
       - may slacked in efficency because not working under close supervision
       - lack of role change may reduce efficiency

HKCEE Computer Studies Paper I (1987)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) i.  (1) -> (E)
           (2) -> (H)
           (3) -> (A)
           (4) -> (C)            4 correct - 1 mark
           (5) -> (B)            5 correct - 2 marks
           (6) -> (F)            6 correct - 3 marks
           (7) -> (D)            7 correct - 4 marks
           (8) -> (G)            8 correct - 5 marks
       ii. program       [1]
   (b) similiarities :   [3]
         - both are calculating aids
         - both are portable
         - both are digital
         - both have display of the output in the device itself
         or any other relevant points
       differences :     [3]
           abacus                        calculator
           - operated by hand            - electrical driven
           - cannot be programmable      - may be programmable
           - use base 5 in operation     - use binary no. in operation
           - limited storage capacity    - greater storage capacity
         or any other relevant points

2. (a) - RAM can be written into and read from
         ROM can be read only                              [1+1]
       - when former is off, data stored in ROM is retained
         while that in RAM is lost. (permanent vs temp)    [1+1]
   (b)    main store                   backing store
       1. short access time            longer access time
       2. expensive                    cheaper
       3. used to store data &         used to store data & program
          program during processing    for future use
      X4. can be accessed randomly     can only be accessed sequentially
       5. small storage capacity       bigger storage capacity
       or any other relevant points                       [3]

   (c)   -1100 0101
       =  0011 1011               [1]

          1011 1010 - 1100 0101
       =  1011 1010 + 0011 1011   [1]
       =  1111 0101               [1]

          1011 1010 = -70
          1100 0101 = 59
          1111 0101 = -11
          -70 + 59 = -11          [1]
          therefore valid         [1]

        alternately -11 is within range
           therefore no overflow  [1]
           therefore valid        [1]

3. (see flow chart)   DCEABGF
   correct symbol for the statements n correct symbols
   (n-1) marks                         (max 6 marks)

   correct start and end      [1]
   C,E before A               [1]
   B,G after A                [1]
   correct order of C,E       [1]
   correct order of B,G       [1]
   No from A goes to F        [1]

4. (a) - membership no. - range 00001 to 01000    [1]
       - part of exam taken - A,B or C            [1]
       - date of exam dd/mm/yy                    [1]
       - score obtained 0 to 300                  [1]
   (b) ask member to check                        [2]
   (c) - part of exam passed
       - date of exam passed
       - mark for senior member
       or any other relevant points               [2]
   (d) - transaction file contains only those records which need updating
         while master file contains all permanent records
       - transaction file is temporary while master file is permanent   [2]
   (e) used a sa key for updating, searching and sorting                [2]

5. (a) 0  INP  14
       1  LOA  14
       2  INP  15
       3  SUB  15
       4  BNP  7
       5  LOA  13
       6  HAL  6
       7  LOA  14
       8  HAL  8             (n-3) marks for n correct    [6]
   (b) i. 7
       ii. -1          [2]
   (c) 2 no.s are inputted.
       The smaller of the 2 is loaded into the accumulator.    [2]

6. (a) adv : - easy to search for a box
             - easy to locate borrowers of overdue books
             - link with other library         [3]
       dis-adv : - expensive to install
                 - more easy to down
                 - inhuman                     [3]
   (b) i. good citizen may be suspected or accused of crime
       ii. changing grades awarded
       iii. disclise personal data which may not be beneficial to users   [6]

HKCEE Computer Studies Paper I (1988)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) magnetic tape, cassette tape, magnetic disk, floppy disk, hard disk,
       disk drum, punched card, paper tape, ...etc       [3]
   (b) correct order in storage capacity                  1M
       correct order in physical size                     1m
       correct order in cost                              1m
   (c) cheaper
       portable
       non-volatile
       more memory space
       permanent storage                                [2x3]

2. (see flow chart)
   without 'yes' or 'no' - no mark
   with correct symbol     B and A can swap
   only consider the first one

   J at the beginning
   E at the end
   K just before E
   A branches to F if yes
   B branches to G if no
   F goes to K
   G goes to K
   I before H
   D just after H
   C just after D
   C branches to somewhere between I and H if no
   C branches to K if yes                             [1A x 12]

3. (a)        1110    1111     A
       1st     9        2      2
       2nd     5        9      9
       3rd    -1        9     -4       [1x8]

   (b) contents at 1110 = -1           [1A]
       contents at 1111 = 9            [1A]
   (c) Find the max [2A] no.of inputted no.   [1M]
       and stored in 1111                     [1M]

4. (a) i. 24 (dec) = 2^4 + 2^3
                   = 0001 1000 (bin)          [2A]
      ii. 10 (dec) = 2^3 + 2
                   = 0000 1010 (bin)          [1A]
         -10 (dec) = (1111 0101 + 1) base 2   [1M]
                   = 1111 0110 (bin)          [1A]
   (b) i. 1111 1110 (bin)                     [2A]
      ii. 1111 1110 - 1    1's com
        = 1111 1101       --------->      0000 0010   [3M]
        Ans = - 0000 0010 (bin)
            = -2                              [2A]

5. (a) collection of data - (1)               [6]
       preparation of data - (2)
       input of data - (3)
       process of data - (4) (5) (6)
       output of data - (7)
   (b) error     - out of range error in the order form   [1]
       detection - rolls must be A to E and no.must be 1 to 36   [1]
       error     - total no.of copies may be incorrect  [1]
       detection - check the sum of copies     [1]
       error     - loss if copies by the photo shop   [1]
       detection - check the sum from the shop with the inputted no.  [1]

       (must be specific and concrete, no mark for validation & verification)

6. (a) AABBC ACABA B    [9 marks]
   (b) payroll
       school report
       sale report, ... etc       [3]

HKCEE Computer Studies Paper I (1989)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) (see diagram)      Arithmetic/Logic Unit
                          Control Unit
                 Input    Main Memory      Output
                          Backing Store
       - from CU to every other box a dotted arrow pointing outwards
         (CU controls all other components)     (0.5 mark each)
       - between MM and every other box a solid arrow
         (need not consider direction of flow)  (0.5 mark each)     [5]
       - correct direction of solid lines between I/O & MM     [0.5 + 0.5]
   (b) data    bus : transmits data     [1]
       address bus : transmits address  [1]
   (c) - economical reason : cheaper
       - permanet storage               [4]

2. (a)   -3.75
       = - (3 + 0.75)     dec
       = - (11 + 0.11)    bin
       = - 11.11          bin             [1+1]
       = -0.1111 x 2^2                    [1]
       bit pattern = 1111 1000 0000 0010  [1+1]
   (b) i. - (2^7 - 1) to + (2^7 - 1)
          or -127 to +127                 [1+1]
      ii. - (1 - 2^7) to + (1 - 2^7)
          or -127/128 to +127/128         [1+1]
   (c)                        floating-point       fixed-point
       i. range               larger               smaller             [1]
      ii. accuracy            less accurate        more accurate       [1]
     iii. processing speed    lower                higher              [1]

3. (a)   address          1002    1003    1101    accumulator
         1st pass           3     #22       1        #3
         2nd pass          #2      10       3         1
         3rd pass           1     #30      #2         4
         4th pass           0      20      #6        #2             [max 6]
   (b) 3142    [1+.5+.5+1]        142 wrong
                                  3142...     pp-1
       22      [2+1]              22...       pp-1

4. (a) Fear of - loss of privacy                      [2]
               - misused of data                      [2]
               - change / destruction / loss of data  [2]
   (b) physical - key, locks
                - restrictions on no.of users
                - shradders to destroy output
       access to info - passwords                     [2 or 0]
       others - backup files                          pp-1
              - encryption of data
              - audit trails

5. (see flow chart)                       start I
   - I before B                           boil B
   - B before E                           pour E
   - E before J                           add powder J
   - J before A                           cap A
   - A before D                           shake D
   - G to D if 'no'                       dissolved G     Y
   - G before H                           too hot ? H    --->   cool F
   - H to F if 'yes'                      feed
   - H to K if 'no'                       end
   - K before C
   - G,H correct shape
   - I,C correct shape
   - F branches to somewhere between G & K      [12]
   (no marks without box and line)

6. (a) name
       ID no.
       salary
       date of entry/appointment / no.of years of service
       age (DOB)                                [5]
       (no mark for sex, tel.no.)
   (b) double data entry /
       ask employees to check the data after entry   [2]
   (c) name : type checking (must be alphabetic)
       ID no. : check digit /
                or 1st char alphabetical, rest numeric / length check
       salary : range check
       date of entry : compatibility check or range check
       age : range check                                 [5]

HKCEE Computer Studies Paper I (1990)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) - so that computers can calculate automatically     [1]
         (ie. can carry out series of instructions without human interference)
       - so that computers can operate repeatedly          [1]
   (b) programmable calculator
       micro-wave oven
       camera
       washing machine, ...               [3]
   (c) ALU - performs arithmetic and logical operations    [2]
       CU  - coordinates & control the principal units of the computer  [2]
       ???
   (d) Airline reservation system
       Point-of-sale system
       Automatic Teller Machine
       ...

2. (a) i. 10 0011            workings           [1]
       ii. 77                workings           [1]
       iii. I   66           workings           [1]
            II  CEE          workings           [1]
   (b) ???
   (c) ???

3. (a)  2  3  3
        1  7  7     [4]
   (b) instruction reg. : 0100 1110    [2]
       program counter  : 0111         [2]
       acc              : 0000 0111    [2]   ???
   (c) calculate and output the sum of n no.s   [2]

4. (a) see flow chart
   (b) C   : calculate monthly expenses for travelling to work by car     [1]
       A,B : calculate monthly expenses for travelling to church by bus.
             calculate monthly expenses for travelling to work by MTR     [1]
       D,E : calculate monthly cross-harbour tunnel fee
             calculate monthly expenses for petrol       [1]

5. (a) implementation cost (including hardware & software)
       availability of staff to operate the system
       availability of hardware and sortware
       cost effectiveness
       availability of accommodation
       staff training
       maintenance       [2]
   (b) address
       name of parents
       sex
       DOB
       date of entry
       student no. / class no.   [2]
   (c) No, different students may have the same name  [2]
   (d) backing up master file before processing father-son  [2]
   (e) sequential access : saves space   [1]
       random     access : fast          [1]
   (f) creation of reports
       deletion of reports
       changing/edit reports
       for checking the info of the students   [2]

6. (a) job displacement
       loss of privacy
       misuse of info
       electronic watchdog
       decline of human interaction    [3]
   (b) aid to job or greater job satisfaction
       arousing popularity of PC
       computer training expenses
       user friendly software
       more task-oriented software are available   [2]
   (c) theft of computer time / service
       theft of program
       unauthorized change of data
       unauthorized access to computer system
       spread of virus
       fraud ???  (money or goods)
       industrial ??          [3]
   (d) ???
   (e) account passwords
       access privilage control (user profile)
       encryption of message (over communication)  [2]

HKCEE Computer Studies Paper I (1991)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) 1. bar code scanner / reader
       2. MICR or OCR
       3. plotter
       4. magnetic disk/tape, optical disk, CD ROM, hard disk
       5. laser printer or daisy wheel printer, ink jet printer
       6. scanner                              [0.5x6]
   (b) adv : fast, silent
       dis-adv : output not permanent          [2]
   (c) 1. Blind man :
             input  device : keyboard                                  [.5]
             output device : sound synthesizer / braille code printer  [.5]
             because he can't see but can touch and hear               [.5+.5]
       2. Limbless man :
             input  device : voice recognition
             output device : visual display unit / printer
             because he can't touch but can speak and see              [2]
   (d) storing vast amount of data                                     [1]
          input  \   communication                                     [2]
          output /

2. (a) 1.   execute module A (get name)
       4.1  execute module A
       4.2  execute module B1 using the name obtained in step 4.1
       4.3Y increase frequency count of the name (by 1)
       4.3N assign 1 to the frequency count of the name
       5    execute module C (alphabetize list)                        [6]
   (b) see flow chart

3. (a)   address          1011    1100    1111    accumulator
         1st pass           2     #-9     # 2        -9
         2nd pass          #4     #-8     # 6       #-8
         3rd pass          #6     #-7     #12       #-7
         4th pass          #8     #-6     #20       #-6
         5th pass         #10      -5      30       #-5                [8]
   (b) i. 110
       ii. 0      [2]
   (c) to sum up the arithmetic progression 2,4,6, ..., 20     [2]

4. (a) i.   0 type bit -> integer
            111 (bin) = 7           [1]
       ii.  1 type bit -> char
            110 0000 (bin) = 64 + 32 = 96   [1]
       iii. 0 type bit -> integer
            1 sign bit -> -ve integer
                          1C          +1
            10 1111 (bin) --> 01 0000 --> 01 0001 = -17     [1]
   (b) i. ASC("E") = 69
                   = 100 0101 (bin)
          therefore, bit pattern is 100 0101
                              1C            +1
       ii. 5 = 00 0101 (bin)  -->  11 1010  -->  11 1011
          therefore, bit pattern of -5 is 011 1011          [1]
   (c) -32                                                  [1]
   (d) "[" and "?" cannot be represented                     [1+1]
       because their ASCII value < 64 making the type bit 0  [1]
   (e) answer to (c) would be the same (ie. -32)
       answer to (d) would be "[" cannot be represented
       because its ASCII > 64 making the type bit 1          [3]

5. (a) 1 - E    mark sheets
       2 - A    check mark sheets
       3 - L    checked mark sheets
       4 - C    enter marks
       5 - K    validation
       6 - J    student particular files
       7 - H    process mark
       8 - G    exam file
       9 - D    error report
      10 - B    -|
      11 - F     |- top ten list, statistical figures, exam report
      12 - I    -|                                                [6]
   (b) i. - mark
          - subject code / student no. / student name
       ii. - type of error
           - location of error                          [4]
   (c) i. mark, grade
       ii. student name, student no., ID, ...           [2]

6. (a) - more data is avail nowadays / better computer knowledge
       - data are shared by many users nowadays
       - data access need not be done physically nowadays    [3]
   (b) i.   a programmer gains access to proprietary company info
            concerning a bid on a construction project and sells
            that info to a competitor
       ii.  a student figures out the password to a central computer
            system and uses computer time via a portable terminal.
       iii. a company employee who has authorized access to the company
            database becomes curious and starts browsing through the files
       iv.  disk crash due to a computer virus, computer failure, ...   [1]
   (c) 1. - because of the large no.of users, it is difficult to keep
            the secret code secret
          - you do not know who has entered the system   [2]
       2. A user can enter the system only after he/she is recognised
          by the system as an authorized user through the various means  [2]
          such as
          - a list of questions                                          [1]
          - voice
          - signature
          - picture
          - physical feature of the person

HKCEE Computer Studies Paper I (1992)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) example
       1. - read prices of goods from bar codes in supermarket or   [1]
          - read book no.s from bar codes in libraries
       2. - editors of newspapers or magazines;
            extract and edit graphical images from pictures    or   [1]
          - fashion designers; extract graphical images to be used
            as patterns whcih can be printed on clothes
       3. - select software generated options on screen        or   [1]
          - draw lines or pictures in CAD software
          - play games

       reasons       
       1. - it can speed up the process of data input               [1]
       2. - it transforms graphical images into codes               [1]
            that can read or stored by computers
       3. - it can locate any position on the screen quickly        [1]
          - fast and efficient

   (b) - magnetic disk can support direct access mode while
         magnetic tape only supports sequential access mode
       - time for searching record is shorter for magnetic disk
       - different storage organization                             [2]
   (c) - RAM allows read or write operation
         ROM only allows read operation                             [1]
       - data will be lost in RAM once the power is off
         data is permanently stored in ROM                          [1]
   (d) - size of expanded memory = size of ROM + size of RAM
                                 = 512 + 10 x 512 (bytes)
                                 = 5632  <  2^13  (bytes)           [1]
         therefore, 3 additional address lines are required.        [1]

2. (a) procedure    A - 5        [1]
                 B, C - 1, 2     [2]
                 D, E - 3, 4     [2]
   (b) see flow chart            [7]

3. (a)   address          1101    1110    1111    accumulator
         1st pass           2       4      30         2
         2nd pass           2       3     120         2
         3rd pass           2       2     360         2             [5]
   (b) 3            [2]
   (c) i.  720      [1]
       ii. 720      [2]
   (d) the program is to calculate the product of 6,5,4 & 3   [2]

4. (a) 1.  11 0010,  2
       2.  11 1010,  :
       3.  11 1000,  8      [5]
   (b) 1. binary integer 2              : 0000 0010                   [1]
          two's complement of integer 8 : 1111 1000                   [1]
          addition                      : 1111 1010
          The result is the two's complement of integer 6,  ie.-6     [1]
       2. "3"
          ";"
          "9"                         [3]
               0000 0011
            +) 0000 1001
           --------------
               0000 1100    =  12     [1]

5. (a) customer no.
       stock no.
       order amount
       eg. customer no. = M+1         [4]
   (b) F1, F2, F5   (1 mark each, deduct 1 mark for each wrong answer)  [2]
   (c) for more efficient processing                    [1]
   (d) update stock file
       print out-of-stock report
       combine orders with customer and stock details   [3]
   (e) ------------------------------------------
       |        XXX Company Invoice             |
       |        -------------------             |
       |  To   : Mr XXX (Customer No.: 012)     |    [1]
       |  Date : XX Oct 91                      |
       |  Goods ordered : ZZZ (Stock No.: 020)  |
       |             at : $20 each              |
       |         amount : 3                     |
       |        debited : $60                   |    [1]
       ------------------------------------------

6. (a)  1 - II
        2 - III        I - 5
        3 - III       II - 1, 4, 6
        4 - II       III - 2, 3
        5 - I
        6 - II                       [3]
   (b) using legal protection of copyright
       devising a code of computer ethics   [2]
   (c) data encryption
       password to restrict file access
       protection codes to prevent diskcopying   [3]
       (also accept software lock, card, voice regconition, ...)

   (d) i. 1. No error, sum = 31, remainder = 3   [1]
          2. Error,    sum = 7,  remainder = 0
             Check digit should be 0             [1]
          (1 mark for working)                   [1]
      ii. - if the check digit itself is wrongly typed     [1]
            or
          - if the wrong digit sequence generates a remainder
            which has the same value as the check digit.
            (can use example)

HKCEE Computer Studies Paper I (1993)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) i. mouse
          graphics tablet
          high resolution monitor
          plotter                   [4]   (only count the first 4 answers)
      ii. bar code scanner
          computer terminal         [2]
   (b) advantages : i. cheaper
                   ii. more portable  [2]
       disadvantages : i. longer access time
                      ii. less durable
                     iii. less storage capacity       [2]   (any two)
   (c) any two - optical disk
                 IC card / smart card / IQ card
                 paper tape
                 punched card                         [2]

2. (a) A - 2.2
       B - 2.1
       C - 1.1
       D - 2.2.1
       E - 2.1.3
       F - 2.4
       G - 2.2.2         [7]
   (b) 3.1  assign TotalPay/NumOfEmployees to AvgSalary
       3.2  print TotalPay
       3.3  print AvgSalary                             [3]
   (c) - can be edited easily using a word processor
       - modular                                        [2]

3. (a)   address           F1      F2      F3     accumulator
         1st pass         104       0       1        -4
         2nd pass         -14       1       2        -3
         3rd pass        -121       2       3        -2
         4th pass          48       2       4        -1
         5th pass         -95       3       5         0           [8]
   (b) ($F2) counts the no.of -ve values in the input sequence;
       ($F3) is the loop counter                                  [2]
   (c) 2                                                          [2]

4. (a) i. for effective communication with other computers /
          most computers use ASCII codes                          [2]
      ii. to be more economical (since ASCII requires 7 bits
          to represent a char)                                    [2]
     iii. so that the natural ordering of alphabet is maintained  [2]
   (b) i. F : 1010
          G : 1100
      ii. case 1: Y delects an error of transmission
          case 2: Y receives the char "B" instead
     iii. 1. Y receives the char "D", "H" and "B"
          2. Y detects an error of transmission                   [6]

5. (a) CLASS_NUMBER/NAME     [1]
   (b) 105 bytes             [1]
   (c) i. use COMMITTEE                               [1]
          - find the record with POST = Chairman
          - get the CLASS_NUMBER, say xxx             [1]
          use CLASSMATES
          - find the record with CLASS_NUMBER = xxx
          - get the TELEPHONE, say yyy                [1]
          print yyy
      ii. first set no.of female Committee members 0         [1]
          then use COMMITTEE, for each record
          {- get the CLASS_NUMBER, say xxx                   [1]
           - then check if the record of CLASS_NUMBER xxx
             of CLASSMATES has its SEX = F or not,
             if yes, increase the no.of female Committee members by 1   [1]
          }
          output the no.of female Committee members
   (d) disadvantages : 1. it requires more storage space
                       2. if there are 2 classmates of the same name,
                          then the data in COMMITTEE may become ambiguous.  [2]
   (e) If the telephone no. of a class committee member has been changed,
       it is possible that the secretary updates CLASSMATES file
       but forgets to update COMMITTEE file.                                [2]

6. (a) i. 1. in retrieving data and info, the manager uses the
             database management system instead of turning pages.     [1]
          2. in typing letters or documents, the typists use the
             word processor to retrieve and edit files
             instead of typing the whole thing again.                 [1]
          3. less manual calculations                                 [1]
      ii. 1. Since many works can be done by the computer,
             their posts may become redundant.                        [1]
          2. Thier working styles change, and they are retrained
             for the new styles of working.                           [1]
          3. any three - programmer
                       - computer operator
                       - system analyst
                       - technician
                       - engineer                                      [3]
   (b) - less repetitive work
       - more efficient                                                [2]
   (c) positive impact : increase in productivity                      [1]
       negative impact : decrease in interaction between human beings  [1]
                         and hence deterioation in interpersonal skills

HKCEE Computer Studies Paper I (1994)                                28-02-1997
-------------------------------------------------------------------------------
1. (a) Hard disk and main memory are storage devices.
   (b) These terminals should consist of VDUs and keyboards.
   (c) COMIC should perform the functions of I/O control, resource allocation,
       memory management, job scheduling and error handling.

   (d)  i. COMIC should use the techniques of time sharing.
       ii. COMIC should entertain the users according to the
           first-come-first-serve principle.
   (e)  i. Peter and Andrew can communicate with each other directly. The method
           is as follows: - Peter writes on f1 for Andrew to read
                          - while Adnrew writes on f3 for Peter to read
       ii. ---------------------------------
           | users/files |  f1   f2   f3   |
           ---------------------------------
           | John        |   R    O    R   |
           ---------------------------------
           | Peter       |   O    R    R   |
           ---------------------------------
           | Andrew      |   R    R    O   |
           ---------------------------------
2. (a)  i. 15 represents the integer 15.
       ii. 26 represents the integer -6
      iii. 44 represents the character "M".

   (b)  i. 001000 represents the integer 8
       ii. 010001 represents the integer -15
      iii. 110110 represents the character "W"

   (c)  i. The smallest integer has 0 as its 6th bit.                  4
           The smallest integer in 5 bits rep'd by 2's complement is -2  = -16

       ii. The smallest ASCII value is obtained when K is the smallest.
           Since a character must start with a 1 in the 6th bit,
           the smallest value is K = 100000 (based 2) = 32
           So H = K + 33 = 32 + 33 = 65
           The character whose ASCII value equals 65 is "A".

   (d) The ASCII value of the first small letter is 97.
       When H = 97, K = 65.
       Therefore, the equation should be modified to H = K + 65

3. (a)     ------------------------------------------------------------
           |           | address 1111  | output value  | Accumulator  |
           ------------------------------------------------------------
           | 1st pass  |       4       |       0       |      -1      |
           ------------------------------------------------------------
           | 2nd pass  |       3       |       1       |       0      |
           ------------------------------------------------------------
           | 3rd pass  |       2       |       1       |       0      |
           ------------------------------------------------------------
           | 4th pass  |       1       |       0       |      -1      |
           ------------------------------------------------------------
           | 5th pass  |       0       |       1       |       0      |
           ------------------------------------------------------------
   (b) The output values are 1,0,1,1,0
   (c) The purpose of the program is to check whether the input numbers are
       divisible by the number stored in 1100.
   (d)  i. The output is 0
       ii. The program can handle positive numbers only.

4.        timecard
              |
          key-to-disc      <----------------
              |                            |
          timecard file                    |
              |                            |
          validation       ---->       error report
              |
          validated timecard file
              |
          sorting
              |
          sorted timecard file
              |
          calculating       <----         worker master file
              |                                  |
          updating          --------------->------
              |
          printing
              |
          pay slip

5. (a) The complete modified program is:
           let the given value be xxx;
           open the file EMPLOYEE;
           search for the record with ID_CARD_NO = xxx;
           if found then
                 let EMPLOYEE_ID be yyy;
                 open the file SALARY;
                 search for EMPLOYEE_ID = yyy;
                 if found then
                      print ID_CARD_NO
                      print WORKING_HR x WAGE_PER_HR
                 end-if
                 close the file SALARY
           else
                 print "no record found"
           end-if
           close the file EMPLOYEE

   (b) The field EMPLOYEE_ID should be replaced with ID_CARD_NO.
       Because we need to establish the link between the two files.

HKCEE Computer Studies Paper II (1994)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) i.  input  value :    2    3     5      6
           output value :    4   18   1250   15552
      ii.  original program statement        corrected program statement
           temp := 2;                        temp := 2;
           for j := 1 to n-1 do              for j := 1 to n do
           temp := temp * n;                 temp := temp * j;

     iii.  repeat
               readln (n);
               if n<=0 then writeln ('REENTER PLEASE');
           until n>0;

   (b) i. -999: locates the pointer pointing to 1st element of the linked list
          -888: indicates the end of the linked list

      ii.  0   -999    1              -999    1             -999    1
           1    n1     2               n1     3              n1     3
           2    n3     4               n3     7              n3     4
           3    n2     2               n2     2              n2     2
           4    n4     7               n4     5              n4     7
           5    n6   -888              n6     6              n6     8
           6    n7   -888              n7   -888             n7   -888
           7    n5     5               n5     4              n5     5
           8    ---   ---              ---   ---             m      6

2. (a) days  : array [1..12] of integer;
       mname : array [1..12] of string;

   (b) days[01] := 31;   mname[01] := 'January';
       days[02] := 28;   mname[02] := 'February';
       days[03] := 31;   mname[03] := 'March';
       days[04] := 30;   mname[04] := 'April';
       days[05] := 31;   mname[05] := 'May';
       days[06] := 30;   mname[06] := 'June';
       days[07] := 31;   mname[07] := 'July';
       days[08] := 31;   mname[08] := 'August';
       days[09] := 30;   mname[09] := 'September';
       days[10] := 31;   mname[10] := 'October';
       days[11] := 30;   mname[11] := 'November';
       days[12] := 31;   mname[12] := 'December';

   (c) writeln ('Enter the given date:');
       write ('Month ?  '); readln (ipmonth);
       while (ipmonth<1) or (ipmonth>12) do
       begin
           writeln ('Reenter using 1-12');
           write ('Month ?  '); readln (ipmonth);
       end;

       write ('Day ?  '); readln (ipday);
       while (ipday<1) or (ipday>days[ipmonth]) do
       begin
           writeln ('Reenter the day');
           write ('Day ?  '); readln (ipday);
       end;

       writeln;
       writeln ('Enter the no.of days after the above date: ');
       write ('n ?  '); readln (n);
       while (n<1) or (n>365) do
       begin
           writeln ('Reenter using 1-365');
           write ('n ?  '); readln (n);
       end;

   (d) procedure CALCULATE;
          var m : integer;
          begin
              n     := n + ipday;
              year  := 1993;
              month := ipmonth;
            - repeat
            |     m := DAYS[month];
            |   - if (n>m) then
            |   | begin
            |   |     n := n-m;
            |   |     month := month + 1;
            |   |   - if (month=13) then
            |   |   | begin
            |   |   |     year  := year+1;
            |   |   |     month := 1;
            |   |   - end;
            |   - end;
            |     m := DAYS[month];
            - until (n <= m);
              day := n;
          end;

3. (a) for x := 1 to 10000 do
   (b) num := num + random(7);
   (c)     if (pnum>=5)              then num := num-3;
           if (pnum>=2) and (pnum<5) then num := num-2;
           if (pnum =1)              then num := num-1;
       OR
           if (pnum>=5) then num := num-3
              else if (pnum>=2) then num := num-2
                      else if (pnum=1) then num := num-1;
   (d) begin
           q:=0; t:=0; y:=0;
           writeln ('Units of time passed ', '':8,
                    'Number of customers in the queue');
         - repeat
         |      t := q;
         |      CUSGEN (q);
         |      TUNIT;
         |      SERVE (q,t);
         |      y := y+1;
         |      writeln (y:10, q:20);
         - until (y>2000) or ((t=0) and (q=0));
       end.

4. (a) i. - Mary needs not to carry cash when she goes shopping.
          - Payment at the cashier will be faster and more accurate.
      ii. - The shop can save the manpower of updating the price labels.
          - The cashier can handle the payment faster and more accurately.
   (b) A barcode reader could be used.

   (c) i. When the product price changes, it would be very time consuming
          to change all the labels.
      ii. The computer should have a database storing all the product codes
          and product prices. After each product code is read, the computer
          finds the product price from the database. It then adds the product
          price to the total amount.

   (d) The customer code should be stored, because it is unique and can be
       used to find out other details of the customer.
   (e) The password file PWORD should be encrypted.

   (f) A computer should be installed at the head office. In this computer,
       there must be central databases of the products and customers, and
       application software such as spreadsheet, database management system
       and accounting system.

       There should be computer system similar to the original ABC Cosmetics
       Shop in each branch shop. Each system inlcudes computer, barcode reader,
       printer and related application software.

       There must also be a network connecting the branch shops and the head
       office. Hardware for this network inlcudes modems and telephone lines.
       Communication software is also needed for each computer.

       At the end of the day, the computer at the head office collects the
       sales data from all the branch shops. The application software in the
       computer will then use the data to produce a sales analysis report
       for the manager.

HKCEE Computer Studies Paper I (1995)                                28-02-1997
-------------------------------------------------------------------------------
1. (a)  i. instruction register : to hold the current instruction         [2x2]
           program counter      : to hold the address of the next instruction
           accumulator          : to hold the result of calculation / loaded data
           memory data register : to hold data fetched from or
                                  to be stored to main memory
           memory address reg.  : to hold an address for current memory access

       ii. program counter need to be initialized                          [2]
           address of the first instructin will be the initial value       [2]

   (b) advantage of A over B : faster execution / more reliable            [2]
                               (non-volative not accepted)
       advantage of B over A : the Operating System can be edited/enhanced [2]

2. (a) step 1  (insert card)     is an input step;     [x4]
       step 2  (key in password) is an input step;
       step 3  (key in amount)   is an input step;
       step 4  (take card)       is an output step;
       step 5  (take cash)       is an output step.

   (b) check the card, see if it is a valid card
       check the password, to make sure that the card really belongs to the user
       check the amount, it should not exceed 10,000
       check the bank account, whether it has enough money     [1+] x 4

   (c)  i. - involves user's participation   [1]
           - gives immediate response        [1]

       ii. The user has to supply his/her password and
           to tell the computer the amount to be drawn.        [1]

           The computer has to respond immediately so that     [1]
               - the account are kept up-to-date
               - calculations are based on correct figures
               - the user need not wait too long

3. (a)  16                                  [2]
   (b)  i. (A) 1001 1010    (B) LDA 1010    [X10]
               0111 0000        NOT
               0010 0001        INC 1
               0101 1011        STO 1011
               1110 1111        HLT

       ii.  1101 1111                                   [1]
      iii.  to find the two's complement of a number    [2]
       iv.  A and B                                     [1+1]

4. (a)  i.  The computer executes machine instructions only.      [2]
       ii.  A program written in a high level language            [1]
            is compiled into a set of machine instructions.
            The no. of these machine instructions can be reduced  [1]
            if the program is written in assembly language.
      iii.  more difficult to edit / write / read     [1]
            not portable / machine dependent          [1]

   (b)  i.  The diagram breaks the program into smaller parts.  [2]
       ii.  clearer logic / more structured                     [2]
            changing one subprogram will not affect the others  [2]

5. (a)  i. The transmission of data in cables can be done directly
           without any modulation or de-modulation.             [2]

       ii. The computer uses the time-sharing technique.        [2]
           This involves switching the CPU from one program to another
           at short intervals, particularly when the CPU would otherwise
           be idling in a waiting loop.

      iii. Some tasks can be shared by the microcomputers,      [2]
           reducing the workload on C.
           The hard disks in the microcomputers can store some files,
           reducing the utilisation of the hard disk of C.      [2]

   (b) - can communicate with other users                        [2]
       - can share the information and resources on the network, [2]
         such as programs, data files, peripheral devices, CPU

6. (a)    output <----/----------\<---- input file
         document     |          |
                      |          |
      input file ---->\----------/<---- input file   [x4] for each flowline

   (b)       amendments           keying          payment amounts    [x12]
            error report        validation        transaction file
         validated tx file       updating       customer master file
             receipts            printing           accounts file

   (c) Transactions are processed one after the other. /           [1]
       All transactions are to be processed.

       Validated transactions are processed one after the other. / [1]
       All validated transactions are to be processed.

   (d) Retrieval of a particular record data will be faster        [1]
       if random access files are use.
       When customers ask for information about their accounts,    [1]
       they need not wait for a long time for the result.

HKCEE Computer Studies Paper II (1995)                               28-02-1997
-------------------------------------------------------------------------------
1. (a) description of error found [5]              correction [5]
       - forgot to increment X in          insert X:=X+1; after input statement
         the while loop
       - wrong upper limit of range for J       for J := 1 to 10 do
       - wrong upper limit of range for K       for K := 1 to 11-J do
       - wrong condition for swapping           if MARK[K] < MARK[K+1] then
       - forgot to update PRANK            add PRANK := RANK[L] before leaving
                                           the rank allocation loop
   (b) program password;
       var PASSWD : array [1..50] of integer;      [1]
           J,K,PIN : integer;
           ch : char;
       begin
          writeln ('PLEASE ENTER THE PASSWORD');   [1]
          K := 1;                                  [1]
          while K<51 do                            [1+1]
          begin
             read (ch);                            [1]
             PASSWD[K] := ord(ch);                 [1]
             K := K+1;
          end;
       
          PIN := 0;                                [1]
          for J := 1 to 50 do                      [1+1]
             PIN := PIN + J*PASSWD[J];             [1+1+1]
          writeln (PIN);                           [1]
       end.                                        [1]

2. (a)   CH    SCODE         (b)  SPAIR    SHSTRING
         C     AABB               ABAABBAB     M
         E     ABAB   [1]         ABABBBBA     ^    [2]
         G     ABBB   [1]         ABBBAAAB     q    [2]
         A     AAAB   [1]         AABBABAB     5    [2]
         N     BBBA   [1]
         D     ABAA   [1]    (c)  5q^M      [3+1]
         M     BBAB   [1]

   (d)  IPSTRING:='';
        while trunc(length(IPSTRING)/2)*2 <> length(IPSTRING) do    [3]
              readln (IPSTRING);

   (e)  IPSTRING  SHSTRING
          EADC       QC
          FBFF       bf    [2+1]
          DADF       AF    [2+1]

3. (a) procedure ENTER;
          begin
             write ('Enter the basic salary ?  ');                   [1]
             readln (salary);
             while salary<=3000 do                                   [1]
             begin
                write ('Reenter using a greater value ?  ');         [1]
                readln (salary);
             end;

             write ('Enter the no.of overtime hours ?  ');           [1]
             readln (hour);
             while hour<0 do                                         [1]
             begin
                write ('Reenter using a non-negative number ?  ');   [1]
                readln (hour);
             end;
          end;

   (b) procedure CALCULATE;
          begin
             if hour>100 then hour := 100;                         [2]
             if hour> 50 then otsalary := 100*50 + 60*(hour-50);   [2]
             if hour<=50 then otsalary := 100*hour;                [2]
             if otsalary > salary then otsalary := salary;         [1]
          end;                                                     [1]

   (c) begin
           ENTER;                                                  [1]
           CALCULATE;                                              [1]
           writeln;
           write ('The total salary is $', otsalary+salary, '.');  [1+1]
       end.                                                        [1]

   (d) i. to ensure that rule C has no effect on amount of overtime salary  [2]
      ii.         test data
          basic salary  no.of OT hours        particular case tested
             20,000           20              Rule A, the first 50 hours  [+]
             20,000           70              Rule A, the second 50 hours [+]
             20,000          120              Rule B, over 100 hours      [+]

4. (a) It is for identification of books;
       different books may have have the same name, author or publisher   [2]
   (b) Three extra fields are required to store the cost,   [1]
       the selling price and the no.of copies sold.         [1+1]

   (c) adv:    saves storage / avoid reuse / ensure data integrity         [1]
       disadv: It is impossible to change or to trace the old transactions [1]

   (d) The computer has to check whether the entered reference number exists
       in the master file or not. If it exists, the computer has to check
       whether the entered book name, author and publisher match with those
       stored in the book master file.                                     [2]

   (e) branch code:
       - reduce the chance of writing a wrong branch code    [2+2]
       - reduce the chance of inputting a wrong branch code
       - can be used to check the branch name

       no.of forms in batch:
       - check the total no.of forms entered                 [2]

   (f) For each book B in the TRANSACTION FILE,
           find the current stock S of B from the BOOK MASTER FILE.  [1]
       Set C = 0, where C = the no.of copies of B ordered.           [1]
       For each transaction T in the TRANSACTION FILE,               [1]
           if B is in T, then increase C by 1.                       [1]
       If S-C < 5 then print the name of B and                       [1]
                       the value 100-(S-C), which is the no.of       [1]
                       copies of B to be bought

       Effective communication  [4]

HKCEE Computer Studies Paper I (1996)                                28-02-1997
-------------------------------------------------------------------------------
1. (a)  i. secondary memory / backing storage    [1]         disk/tape     [1]
       ii. output unit                           [1]         printer/VDU   [1]

   (b)  i. MDR                        [1]
       ii. MAR                        [1]
      iii. PC/IR/ accumulator / status register / General purpose register [3]
       iv. to carry control signals   [1+1]
        v. 64K memory locations       [1]

2. (a) Law Sai Min, 65217, 12     [1]      (c) i. to serve as a check digit  [2]
   (b) Leung Shing, 62464, 11     [1]         ii. 65217       [1]
       Cheung Che Lin, 23483, 14  [1]             13251       [1]
                                                  74313       [1]
   (d) Add field SEX             [2]
       Change AGE to BIRTHDAY    [2]

3. (a)  i. 1.6.8        [1+1+1]      (b)  i. 0101 1011    [1]
       ii. 8 seconds    [1]                  0100 1111    [1]

   (b) ii. 1 mark for each of the digits 4 and 5  [2]
           turning off the display board          [2]
           total time is 17 seconds               [2]

           0101 1011
           1000 0000
           0100 1111
           1000 0000
           0110 0110
           1000 0000
           0110 1101

4. (a) advantage    : convenient to use              [1]
       disadvantage : not suitable for blind people  [1]

   (b)  i. sound   [1]     ii. sound: speaker  [1]
           video   [1]     ii. video: VDU      [1]

      iii. action:  [2]                       reason:  [2]
           - loop back to the first menu      - to allow change of language
           - generate a prompt such as        - to save screen and attract
             "touch to start"                   new users
           - display info at random           - to attract new users

   (c) a shopping mall where there are a lot of visitors / airport  [2]

5. (a)  i. to identify the patient                                           [1]
       ii. verification: enter ID no. twice and compare the two entered no.s [1]
           validation  : check that the leftmost character is an English letter
                         and the rest are decimal digits                     [1]

   (b)  i. for calculating the hospital fee  [1]
       ii. contact person / sex / medical history / date of birth     [1x3]

   (c) way [2]                              measure [2]
       - password leakage                   - frequent change of password
       - hardcopy leakage                   - shredder
       - user walks away after logging-in   - automatic quit / logoff

6. (a)  i. word processor
       ii. spreadsheet / accounting package
      iii. database package
       iv. graphics / computer assisted design (CAD)  [1x4]

   (b) The statement is correct                                          [1+2]
       Explanation: An application program requires the presence of an operating
                    system for controlling the resources of a computer system.

   (c)  i. for competition / improvement of the product / profit making  [1+1]
       ii. price / compatibility / usefulness of the improvement         [3]

HKCEE Computer Studies Paper II (1996)                              28-02-1997
-------------------------------------------------------------------------------
1. (a) line 10 :  read (IPCHAR);                 [2]
       line 11 :  BOX[CNT] := IPCHAR;            [2]
       line 13 :  CNT := CNT+1;                  [2]
       line 14 :  until (IPCHAR='!');            [1]
       line 15 :  delete                         [1]
       line 17 :  for CNT := LAST-1 downto 1 do  [2]
       line 18 :  write (BOX[CNT]);              [2]

   (b) program B;
       var  DFILE : text;      [1]
            CNT   : integer;   [1]
            XCHAR : char;      [1]
       begin
            CNT := 0;                 [1]
            assign (DFILE, 'FDATA');  [1]
            reset (DFILE);            [1]
            while not eof(DFILE) do   [1]
            begin
                  read (DFILE, XCHAR);  [1]
                  if XCHAR='A' then     [1]
                     CNT := CNT+1;      [1]
            end;
            writeln (CNT);   [1]
            close (DFILE);   [1]
       end.                             all correct  [1]

2. (a)  i. 12345  [1]    (b) i. returns IPSTRING except the rightmost char  [1]
       ii. 23456  [1]       ii. returns IPSTRING except the leftmost char   [1]
      iii. 2345   [1]

   (c)  i. 1234   [2]    (d) i. returns the original IPSTRING
       ii. 56     [2]       ii. returns IPSTRING with rightmost N char removed
                           iii. returns the NULL string                   [2x3]

   (e)  1234567          (f) i. 123456   [3]    ii. 123456789   [4]
        123456                  *2345*              *2345678*
        12345                   **34**              **34567**
        1234                    ******              ***456***
        123                                         ****5****
        12
        1       [1x3]

3. (a) string / integer / integer / array / BL    [1x5]
   (b) procedure PLIST;
       var X:integer;
     - begin
     |      writeln ('Route name   Distance(km)   Rate($/km)   Bus fare($)');
     |      writeln ('----------   ------------   ----------   -----------');
     |      for X := 1 to 40 do
     |          writeln (BR[X].BNAME,  BR[X].BDIST:10,  BR[X].BRATE:12,
     |                   BR[X].BDIST*BR[X].BRATE:12);
     - end;

       variable declaration and print headings   [1]
       loop                                      [1]
       output format                             [1]
       contents of writeln statement in the loop [1]
       record / field reference                  [1]

   (c) procedure PFIND;
       var IPSTRING:string;
           X:integer;
           FOUND:boolean;
       begin
           write ('Enter the name of a route:  ');
           readln (IPSTRING);
           writeln;
           FOUND := false;
           X := 1;
           while not(FOUND) and (X<=40) do
         - begin
         |      if (IPSTRING=BR[X].BNAME) then
         |    - begin
         |    |      writeln ('Route name: ', BR[X].BNAME);
         |    |      writeln ('Distance  : ', BR[X].BDIST);
         |    |      writeln ('Bus fare  : $', BR[X].BDIST*BR[X].BRATE);
         |    |      FOUND := true;
         |    - end;
         |      X := X+1;
         - end;
           if not(FOUND) the writeln ('No such route found.');
       end;

       variable declaration      [1]
       prompt & input statement  [1]
       loop                      [1]
       'found' case              [3]
       'not found' case          [1]
       all correct               [1]

   (d) procedure FMIN;
       var X, WHERE, MIN : integer;
       begin
           MIN := BR[1].BDIST*BR[1].BRATE;
           WHERE := 1;
         - for X := 2 to 40 do
         |     if BR[X].BDIST*BR[X].BRATE < MIN then
         |     begin
         |         MIN := BR[X].BDIST*BR[X].BRATE;
         |         WHERE := X;
         |     end;
         -
           writeln ('Route name: ', BR[WHERE].BNAME);
           writeln ('Bus fare  : $', MIN);
       end;

       var declaration  [1]
       initialization   [1]
       loop             [1]
       find minimum     [2]
       output result    [1]
       all correct      [1]

4. (a) Document 1 : HK ID card
       Document 2 : graduation certificate  [1+1]

       Name, sex, ID no. are checked against those in the ID card    [1]
       Year of graduation is checked with the graduation certificate [1]

   (b) problems:   [2]
         1. It does not distinguish members of the same name
         2. difficult to find a member because they are not arranged in order.
       solutions:  [2]
         1. add membership number / ID no. column (field)
         2. put names in order

   (c) - Use fee record list, note down those members who have not paid fee
         for 3 consecutive years
       - Note down those members who have not paid the fee for one year and
         cannot be contacted anymore
       - remove the member registration cards of all the above members
       - remove address labels of all the above members from the mailing list
       - cross out the rows of the above members in the fee record list    [1x5]

   (d) field name      contents
       ----------      --------
       Name            member's name
       Sex             sex
       Address         address
       Telephone       telephone number
       ID_Num          ID card number
       Grad_Yr         year of graduation
       Occupation      occupation
       Mem_Num         membership number
       Pay_1           'y' or 'n' to indicate payment in the current year
       Pay_2           'y' or 'n' to indicate payment in the previous year
       Pay_3           'y' or 'n' to indicate payment in the year
                       before the current year
       Loss_Contact    'y' or 'n' to indicate loss of contact    [Mx12]

   (e) The purpose of the mailing list is violated. Its original purpose is for
       communication between the association and the members only.  [2]

       effective communication  [4]


HKCEE Computer Studies :                                               16-2-1996
--------------------------------------------------------------------------------
outdated MC questions
Paper IA : 1987 : 1, 2, 25-47                Paper IB : 1988 : Q2
           1990 : 16, 28-46                             1989 : Q5
           1991 : 26, 28-47                             1990 : Q4
           1992 : 28-47                                 1991 : Q2
           1993 : 28-46                                 1992 : Q2

--------------------------------------------------------------------------------
Good exercise if re-written in Pascal
Paper II : 1988 : Q4
           1989 : Q2
           1991 : Q4
           1992 : Q2
           1993 : Q1,4
--------------------------------------------------------------------------------

