Académique Documents
Professionnel Documents
Culture Documents
1. (a) In the following diagram, the boxes represent the main hardware components of a computer
and the arrow lines represent the data flow between the components.
(i) Write down the name of the component represented by box X. Name one device which
is an example of this component
(ii). Write down the name of the component represented by box Y. Name one device which
is an example of this component.
(4 marks)
(b) In the following diagram, boxes A and B represent two registers in the central processing
unit of a computer.
1
1996 Question
(a) Suppose CLASSA has been sorted in alphabetical order of student names. Write down the
first record of CLASSA.
(1 mark)
(b) Suppose CLASSA and CLAASSB have been sorted in descending order of the student
numbers. If CLASSA and CLASSB are now merged together according to student numbers
to become one file, write down the fourth and eighth records of the merged file
(2 marks)
(c) The rightmost digit of each student number is calculated from using the following formula:
rightmost digit = remainder when the sum of the leftmost four digits is divided by 7
(i) What is the function of the rightmost digit of the student number?
(ii) Write down all the invalid student numbers in CLASSA and CLASSB.
(5 marks)
2
1996 Question
A dedicated computer is now used to control the turning on and off of the display board light bars.
The computer will execute instructions of one byte long according to the following rules:
Rule 1: Bits 0 to 6 used to control the display of the pattern. The i-th light bar is turned on if the
i-th bit is 1; the I-th light bar is turned off if the i-th bit is 0
Rule 2: Bit 7 is used to control the display duration. If bit 7 is 0, the pattern will be displayed
3
1996 Question
After a language is chosen, the second menu displayed on the screen is shown below: (Note: The
second menu will be displayed in English or Chinese according to the language chosen.)
4
1996 Question
(a) Give one advantage and one disadvantage of using a touch screen as the input device for the
system.
(2 marks)
(b) When a user has made his choice in the second menu, the system will present the relevant
tourist information. After the presentation of information, the second menu will appear again
on the screen.
(i) Information can be presented to users in text, in graphics or in other forms.
Besides text and graphics, suggest two forms of information presentation for this
system.
(ii) For each answer in (b)(i), suggest one suitable output device to present the
information
(iii) Suggest what the system should do if the screen has not been pressed for a long
time. Give one reason for your suggestion.
(8 marks)
(c) Besides the tourist information center, name two suitable places for using this type of
computer system.
(2 marks)
5. A hospital has a computer system that handles the information about all is patients.
(a) When a patient is admitted to the hospital, the hospital staff will enter the patient’s identity
card number into the computer.
(i) Why should the patient’s identity card number be recorded?
(ii) Suggest one verification method and one validation method to ensure that identity card
numbers are correctly entered.
(3 marks)
(b) When a new patient is admitted to the hospital, the hospital staff will enter the patient’s
identity card number, name, address, telephone number, data of entry etc, into the computer.
(i) Why should the date of entry be recorded?
(ii) Name three other pieces of personal information that should be entered into the
5
1996 Question
computer.
(5 marks)
(c) The hospital sets up a password system in order to prevent unauthorized access to the file of
personal information.
Describe two ways in which personal information stored in the file may still leak out.
Suggest a preventive measure for each way.
(4 marks)
6. (a) For each of the following persons, name one type of application program that would best
facilitate the person’s work:
(i) a writer;
(ii) an accountant;
(iii) a personnel manager;
(iv) an architect;
(4 marks)
(b) “An application program cannot run when an operating system is absent.”
Is the above statement correct? Explain why.
(3 marks)
(c) Software companies normally produce new versions of their software products from time to
time.
(i) Give two reasons why software companies frequently make new versions of their
software products.
(ii) A person using the existing version of software product needs to consider several
factors before he buys the new version of the product. Name three factors that he
should consider.
(5 marks)
6
1996 Question
However, there are several mistakes in the main program. Fill in the following table to show the
locations of all the mistakes and their corrections.
Line Number Corrected Statement
(12 marks)
7
1996 Question
8
1996 Question
9
1996 Question
(e) Write down the output the program if the input string is ‘1234567’.
(3
marks)
The main program is now modified as follows:
(f) Write down the output of the modified program if the input string is
(i) ‘123456’
(ii) ‘123456789’
10
1996 Question
(7 marks)
3. A long-distance bus company runs 40 bus routes.
Each bus route joins the central bus terminus C to a bus terminus represented by Bi
(where i=1,2,….,40), as shown below:
The manager of the bus company wants to write a Pascal program to calculate the bus fees.
Each bus route has:
- a route name;
- a distance (km) from C to Bi, which is an integer;
- a rate ($/km), which is an integer.
The bus fee for each route is calculated by the following formula:
Bus fee = distance × rate
The following program segment is written to declare a data structure which will be used to store
the bus route information.
type BL = record
BNAME: ;
BDIST: ;
BRATE:
end;
var BR: [1..40] of ;
In this data structure, BNAME, BDIST and BRATE will be used respectively for storing the name,
distance and rate of a bus route,
(a) Fill in the following blanks to complete the above data structure.
(1)
(2)
(3)
(4)
(5)
(5 marks)
11
1996 Question
Assume that the variable BR has already been defined in the variable declaration part of the
program, and that all bus route information has been stored in BR.
(b) Write a procedure which outputs the name, distance, rate and fee of each route as shown
below:
Route Name Distance (km) Rate ($/km) Bus Fee($)
NORTH TOWN 30 3 90
WEST POINT 25 2 50
EAST PARK 28 3 84
‥ ‥ ‥ ‥
(5 marks)
(c) Write a procedure which accepts a string (using the prompt “Enter the name of a route:”),
finds the route whose name equals the input string, and then outputs the name, distance and
fee of the route found. If no route is found, the procedure outputs the message “No such
route found”.
Below are sample output of the procedure:
[Sample 1]
Enter the name of a route: NORTH TOWN
Rout name: NORTH TOWN
Distance: 30 km
Bus fee: $90
[Sample 2]
Enter the name of a route: NORTH ROOM
No such route found
(8 marks)
(d) Write a procedure which finds the bus route with the minimum fee and outputs the name and
fee of the route as shown below:
Route name: HIGH STREET
Bus fee: $5
(7 marks)
4. (Note: In this question, you will be awarded up to 4 marks for effective communication.)
An alumni association collects membership fees from members once every year and sends
newsletter to its members from time to time.
The association does not use a computer for its operation. In its manual system, there are
- a mailing list,
- member registration cards, and
- a fee record list
12
1996 Question
Name:
Sex:
Address:
Telephone Number:
HK ID Number:
Year of Graduation:
Occupation:
Membership Number:
The fee record list is used to keep a record of the payment of fees. It has the following format:
13
1996 Question
When a person applies for membership in the association, he needs to fill in a registration card and
pay the membership fee. After verifying the information on the card, the association will place the
card in the right place and add the necessary information to the mailing list and the fee record list
for the new member.
A member is classified as inactive if
- the member has not paid the membership fee for three consecutive years;
or - the member has not paid the membership fee for one year and is out of contact with the
association.
The association removes the membership of all inactive members at the end of each years.
The association is now planning to computerize its manual system.
(a) The person applying for membership should be required to produce some relevant
documents for the verification of information on this registration card. Name two such
documents and explain how they can be used for verification.
(4 marks)
(b) Name two serious problems in the design of the fee record list. Suggest how to overcome
these problems.
(4 marks)
(c) Describe the operations that are involved in removing all inactive members from
membership.
(5 marks)
(d) Suppose the association has computerized its system and a computer file called MEMBER is
now used to hold members’ information required for the running of the system.
Complete the following table to show a structure for MEMBER.
Field Name Description of Contents
(6 marks)
(e) It happens that the chairman of the association is the manager of a credit card company. The
company has printed pamphlets for the promotion of the company’s credit card.
Explain why it is an invasion of privacy for the chairman to make use of the association’s
14
1996 Question
15