Professional Documents
Culture Documents
midyear l6 paper 2
midyear l6 paper 2
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
_________________________________________________________________________
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.
(c) using a spreadsheet application program, or otherwise simulate the following logic
= NOT (.....)
= AND (.....)
= OR (.....)
2
Hint: i. Print the spreadsheet applicaition program showing the formulas
(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
3
Section B[50 marks]
3. Using CASE statement write a program that accepts a mark obtain in a test and displays the
grade.
80 – 100 A
60 – 79 B
50 – 59 C
45 – 49 D
40 – 44 E
0 – 39 U. [20]
4
4 3
use the formula Volume= ∗π∗radius [10]
3
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
(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]
Patient Note
(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]