Vous êtes sur la page 1sur 5

General Proficiency Paper 2 SECTION I Information processing

Answer Question 1 an two ot!ers in t!is section Question 1 " 2# mar$s a) You are using a data entry screen for student examination results. The data to be entered consists of the actual mark, the total mark and the percentage which is calculated as the actual mark divided by the total mark. i. Suggest another field that should be included to identify each student. (1 mark) ii. Sketch an example of this data entry screen. (4 marks) iii. Write any field names which should not be used for input. (1 mark) The following data was seen on the screen actual mark !"#, possible total $%&, percentage mark '&(.#) iv. v. vi. marks) vii. b) Write pseudocode to input data and calculate the student-s percentage. (4 marks) *dentify two errors from the data. (2 marks) +xplain which field is the primary cause of an error occurring. (1 mark) ,ame and describe one validation check that would be appropriate for this form. (2

.or each of the following activities, identify its stage in the development of an information system. (5 marks) i. Writing a test plan. ii. /ollecting evidence showing the information system at different levels of development. iii. Selecting appropriate hardware to use. iv. 0eciding whether or not to set up a computerised information system. v. /oding the application using a programming language.

Question 2 " 1% mar$s a) /alculate the result of the following binary number operations. i. $&$&$% 1 $$% ii. $$$$% 2 &$&$% (2 marks) (2 marks)

b)

3ersons are hired if they have been teaching *T for a minimum of # years and have a graduate degree. *f they are teaching for less than # years, then they must have a certificate to be hired. 4ll other persons will not be hired. i. /onstruct a decision table for the above scenario. (5 marks) ii. Write an algorithm for the above scenario. (6 marks)

Question & " 1% mar$s a) /onsider an item number that consists of eight digits, the rightmost digit being the check digit. /onsider the calculation of the check digits as follows Step $ 4dd up the first seven digits starting from the left Step % 0ivide the sum by ( Step 5 The remainder is the check digit. To determine is a number has been entered correctly Step $ 4dd up the first seven digits starting from the left Step % 0ivide the total by $$. Step 5 *f the reminder is & then the number has passed the validation check i. ii. ii. iii. b) +xplain the purpose of the check digit 6ive an example of where check digits are used 0etermine the check digit for %#'5&"(5 0etermine if 75"'%"$5 has the correct check digit (2 marks) (1 mark) (2 marks) (2 marks) (2 marks) (2 marks) (2 marks) (2 marks)

0escribe the following types of errors and checks i. Software and hardware errors ii. Transmission errors iii. +ven and odd parity checks iv. 8erification and validation checks

Question ' ( 1% mar$s a) 4 feasibility study is carried out on a potential pro9ect. *nformation is to be collected from six managers and %&& other employees. The methods are :uestionnaires, interviews and observation. +xplain what method you would use for the managers and employees. (6 marks) 6iven #$.%57 $&%, identify i. the mantissa or argument ii. the base or radix iii. the exponent iv. the notation used

b)

v. c) d)

result as a decimal number

(5 marks)

+xplain the purpose of hashing. (2 marks) 6ive the result of using the hash function h ; <ey =>0 $( on the key 5%. (2 marks)

SECTION II Programming
Answer Questions % an T)O ot!er *uestions from t!is section Question % " 2# mar$s a) Write a program in ?4S*/, 3ascal or a specific language of your choice @not pseudocode) to produce a table similar to the one below. The cost of a hammer is A$(.#&, nails cost A&.&# each and screws cost A&.%#. 3rompt the user to input the :uantity of items. *nclude the use of constant variables. The table shown below illustrates the cost of purchasing % hammers, $#& nails and %& screws. (12 marks) *tem 4mount /ost BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB Cammer % A5#.&& ,ails $#& A (.#& Screws %& A #.&& b) c) d) e) 0escribe two checks that you would include in the program to ensure that the :uantity is entered correctly. (2 marks) Write a fragment of code that would repeat the input of the :uantities until & is entered. (3 marks) +xplain why the use of Dero as a terminating condition is not appropriate. (2 marks) State a value which is reasonable as a terminating condition. (1 mark)

Question + " 1% mar$s 4nswer the :uestions on the following algorithm $. for 9 ; $ to ,B$ do %. begin 5. *ndex ; 9E 7. for k ; @9 2 $) to , do #. if FistGkH I Fist G*ndexH ". then *ndex ; kE (. Temp ; Fist G*ndexHE '. Fist G*ndexH ; Fist G9HE !. Fist G9H ; Temp $&. endE a) 6iven the numbers #, %, ', $&, 5 i. State the value of , in the algorithm. ii. State the range of values for 9 in line $. iii. 0escribe the data structure used to manipulate the numbers. (1 mark) (1 mark) (2 marks)

iv. v. vi. vii. viii.

Write code for the declaration for this data structure. (2 marks) Trace the algorithm using the numbers given. Write the numbers at each step. (6 marks) +xplain what task is achieved in lines ( to !. (2 marks) The above algorithm sorts numbers. 0escribe C>W the numbers are sorted. (1 mark) State how the name of the sorting algorithm. (1 mark)

Question , " 1% mar$s Write code in ?4S*/, 3ascal or a specific language of your choice @not pseudocode) to produce the following a) /reate a variable called thisWork of type text. (1 mark) b) 4ssign the file JmyWork.txt- located on the 4 drive to the variable. (2 marks) c) /reate a new empty file. (2 marks) d) .rom a list of numbers from % to %&, write all even numbers to the text file. The numbers must each be on separate lines. (3 marks) e) Start from the beginning of the file myWork. (2 marks) f) 4dd the number $ to each number @called num) in the file. (2 marks) g) 4dd the sentence K+ven to >dd- to the end of the file. (2 marks) h) /lose the file. (1 mark) Question - " 1% mar$s a) +xplain the difference between i. pseudocode and flowchart ii. testing and debugging iii. searching and sorting iv. internal documentation and user documentation v. procedures and functions (10 marks)

b)

Write a function that prompts a user for an id number @integer), a salary @real) and a letter @character). Your function should prompt the user for each value. *f the letter is J.-, the function should return the user-s salary, otherwise return the letter input. (5 marks) +,0 >. T+ST

Vous aimerez peut-être aussi