Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

ENGINEER NYAMZ HIGH SCHOOL

END OF TERM EXAMINATIONS 2019


Advanced Level

FORM 5
COMPUTER SCIENCE 6023/2
Paper 2 Practical 3 hours
TIME 2 hours 30 minutes
Term 2 Paper
Additional materials:
CD

TIME 3 hours

INFORMATION FOR CANDIDATES


This is a purely practical examination. All answers should be printed. Handwritten answers
Will not be marked.
This paper consists of three sections.
Section A 20 marks
Section B 50 marks
Section B 30 marks
Answer all questions from section A, B and C.
Each answer sheet should include the following information in the header section:
 Candidate Name and Candidate Number
 Centre Name and Date
 Subject Code

When answering programming questions, indicate the language used.


All work should be backed up by a soft copy on a CD. If a candidate prints on more than one sheet,
fasten together with string. All answers should be correctly and clearly numbered.

_________________________________________________________________________
This question paper consists of 5 printed pages.
Copyright: Engineer Nyamz High Computer Science Department 2019

©Engineer Nyamz
[Turn over

1
Section A[20 marks]
1. A computer-controlled machine produces plastic sheets. The thickness of each sheet
must be within a certain tolerance. The sheets are kept below 50 °C as they move over
rollers at 10 metres per second.
Three parameters need to be monitored all the time.

(b) Draw the truth table for the monitoring system.

(c) using a spreadsheet application program, or otherwise simulate the following logic

circuit. Use only the following logic gates.

Logic Gate Spread Sheet Formula

= NOT (.....)

= AND (.....)

= OR (.....)

2
Hint: i. Print the spreadsheet applicaition program showing the formulas

ii. Print the other spreadsheet with the inputs A = 1 B = 0 C =1.

(d) Each different interrupt needs to be handled appropriately and different interrupts might

possibly have different priorities. Draw a flow chart for the following scenario

i. check for instruction to be executed

ii. if yes fetch next instruction if no repeat start the process

iii. next decode the instruction

iv. next execute the instruction

v. check for any interrupts to be processed

vi. if no start the process of checking for instruction to be executed

if yes transfer control to interrupt handling.

3
Section B[50 marks]

2. Below is a form showing traffic lights.

Write a program to simulate traffic lights. Set your time at 2 seconds.


(a) Print the interface with the amber light enables [6]
(b) Save and print the source code. [14]

3. Using CASE statement write a program that accepts a mark obtain in a test and displays the

grade.

Grades are obtained using the following grading scale:

80 – 100 A
60 – 79 B
50 – 59 C
45 – 49 D
40 – 44 E
0 – 39 U. [20]

4. Write a program to calculate the volume of a sphere

4
4 3
use the formula Volume= ∗π∗radius [10]
3

Section C[30 marks]

5. A hospital is organised into a number of wards. Each ward has a ward number and name

recorded, along with a number of beds in the ward. Each ward is staffed by nurses.

Nurses have their staff number and name recorded, and is assigned a single ward.

Each patient in the hospital has a patient identification number, and their name, address

and date of birth recorded. Each patient is under the care of a single consultant and is

assigned a single ward. Each consultant is responsible foe a number of patients.

Consultants have their staff number, name and specialism recorded.

(a) Draw an entity-relationship diagram to show the relationship between the entities.

On the diagram, show the primary key and at least one attribute for each entity . [15]

(b) The following is an un-normalised table named Patient Note.

Patient Note

Patient ID Patient Address Email Prescription Prescription


Name Number Name
DS001 John Chomba Dzivaresekw jj@yahoo.com A11 Panado
a B14 Vicks
C17 Amoxicillin
D10 Woods
AB006 Precious Kuwadzana pg@homail.com C17 Amoxicillin
Gumbo B14 Vicks

(i) Draw the 1NF of the above table. Underline Primary Key field(s). [5]
(ii) Come up with the 2NF of the table you created, indicating Primary Key field(s). [10]

You might also like