2024j (2)
2024j (2)
061306T4CSC
COMPUTER SCIENCE LEVEL 6
ICT/OS/CS/CR/04/6/A
UNDERSTAND FUNDAMENTALS OF PROGRAMMING
July/August 2024
WRITTEN ASSESSMENT
TIME: 3 HOURS
INSTRUCTIONS TO CANDIDATE
1. The paper consists of two sections: A and B.
2. Answer ALL questions in Section A and any Three from section B.
3. Marks for each question are indicated in the brackets.
4. A separate answer booklet will be provided.
5. Do not write on the question paper.
Candidate should check the question paper to ascertain that all the pages are
printed as indicated and that no questions are missing.
Page 1 of 4
©2024 TVET CDACC
Page 2 of 4
©2024 TVET CDACC
development activities in the constituency. The CDF committee would like to develop
a new computerised system to help them in managing their operations. Assuming that
you have been hired as the project manager to coordinate the exercise of coming up
with this new system, discuss SEVEN major phases of developing a system that you
b. Explain THREE features of the Java programming language that provides a conducive
15.
a. You have been tasked to create a simple java program to sum up two numbers; a and
b. It should return the sum using a method called addNumbers. Write the code which
you would enter two numbers and return sum. (10 Marks)
c. Explain THREE types of operators used in Java to manipulate data and variables.
(6 Marks)
16.
a. Access modifiers are used to set the accessibility (visibility) of classes, interfaces,
variables, methods, constructors, data members, and the setter methods. Explain the
Page 3 of 4
©2024 TVET CDACC
b. One of the skills required of a programmer is to be able to write code that has proper
working control structures. Debug the code provided below to make it functional.
(6 Marks)
int a = 4
int b = 9
min == ( a<b ) ? a : b;
System.out.println( min );
c. One of the control structures used in programming is the switch statement which
observes certain rules. Write the general syntax of the switch statement as used in
Java. (6 Marks)
17.
c. Explain FOUR types of inheritance that one can use when programming using Java.
(8 Marks)
Page 4 of 4