0% found this document useful (0 votes)
200 views4 pages

Computer Science Examination S6

The document is an examination paper for Senior 6 Computer Science students in Musanze District, covering various topics including programming, computer security, and network management. It consists of multiple sections with questions ranging from multiple-choice to programming tasks in languages such as VB, C++, and Java. Students are required to answer all questions in Section A, attempt any three in Section B, and only one in Section C.

Uploaded by

niyongabo390
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views4 pages

Computer Science Examination S6

The document is an examination paper for Senior 6 Computer Science students in Musanze District, covering various topics including programming, computer security, and network management. It consists of multiple sections with questions ranging from multiple-choice to programming tasks in languages such as VB, C++, and Java. Students are required to answer all questions in Section A, attempt any three in Section B, and only one in Section C.

Uploaded by

niyongabo390
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MUSANZE DISTRICT

SUBJECT: COMPUTER SCIENCE


CLASS SENIOR 6 MCE&MPC
TERM: 2nd
DURATION:3 HOURS
SECTION A: ANSWER ALL THE QUESTIONS /55MARKS
1. Choose correct answer: (3Marks)
i. Two or three characters appended to relative filename separated by a period.
a) status
b) identifier
c) extension
d) descriptor
ii. A program responsible for assigning the CPU to the process that has been selected by
the short term scheduler is known as:
a) Scheduler
b) Dispatcher
c) Debugger
d) None of the above
iii. The technique of gradually increasing the priority of processes that
wait in the system for a long time is called
a) Aging
b) Throughput
c) FCFS
d) None of the above
2. What is computer security? What is the purpose of computer security? (4Marks)
3. Discuss the advantages and disadvantages of FDDI within a Local Area Network. (5Marks)
4. Develop a VB program which displays the sum of numbers ranging from 0 to 10, use
do….loop until. (4Marks)
5. Make a flowchart to input temperature, if temperature is less than 32 then print“Below
freezing” otherwise print “Above freezing”. (4Marks)
6. Differentiate first generation and third generation of computer programming languages
(4Marks)
7. Write a C++ program to read marks (per cent) of students in S6MCE in GS GIHINGA and
put these students into classes according to their marks. Classes with their corresponding
marks: (6Marks)
• From 80 to 100: First class honors
• From 70 to 79: Upper second class honors
• From 50 to 69: Lower second class honors
• From 40 to 49: Pass
• Below 40: Fail
• Default: Invalid Marks
8. Write a java program that receive two numbers and display their the sum and average
(4Marks)

Page 1 of 4
9. Write a C++ program using class called Rectangle and an object called rect. This class should
have four members: two data members of type int with private access and two member
functions with public access: set_values() and area(). Set_values() to input the values of
rectangle and area() to return the area of rectangle. (4Marks)
10. What do you understand by Paging? Give advantages and disadvantages of paging in memory
management? (6Marks)
11. a. Differentiate memory and storage (2Marks)
b. State any four features of ROM and RAM (4Marks)
12. Write a Java program that do the following: (5Marks)
• Create linkedList from linked list with assigned to the variable district.
• Add the following district in the List (Gakenke, Rubavu, Gasabo, Nyagatare,Nyabihu )
• Add Bugesera District to the front of list and Karongi to the 4th position
• Replace Gasabo District with Nyarugenge
• Retrieving the Second District using Index
• Show the Size and Remove the last district in the List

SECTION B: ATTEMPT ANY THREE QUESTION /30MARKS


13. Consider the following table:
Process Arrival time Burst time Priority
A 0 7 4
B 1 5 2
C 3 2 1
D 9 5 3
E 12 5 5
Draw the Gantt chart and calculate the waiting time and the average turnaround time for each of
the following scheduling algorithms:
a) FCFS (2Marks)
b) Non preemptive SJF (2Marks)
c) Preemptive SJF (2Marks)
d) Priority (2Marks)
e) Round Robin(Time quantum 2ms) (2Marks
14. a.What are the advantages of using OSI layered model? (3Marks)
b. Describe each one of the 7 layers of the OSI model. (7Marks)
15. a. Compare peer to peer network to client server network (4Marks)
b. Differentiate different network topologies (6Marks)
16. After connecting the following vb interface form using Adodc to the database, Write the code
of each control command (Add, Delete, Next, Previous, Top, Bottom, Update, and Exit).
(10Marks)

Page 2 of 4
17. Knowing that the formula to compute the volume of cylinder is v=pi*(r^2)*h where v=
volume; pi=22/7; r=radius and h=height. Using Function Write a required code to make
program that calculates the volume of cylinder using the VB interface as designed bellow:

When you run the program, you should be able to see the interface as shown in. If you enter a
value each in radius box and the height box, then click OK; the value of volume will be
displayed in the volume box. (10marks)
SECTION C: ATTEMPT ONLY ONE QUESTION /15MARKS
18. a. Why visual basic is an event driver programming language? (2marks)
b. List the components of visual basic application. (3marks)
c. Write a visual basic program that compute the following tasks according to the interface
bellow. (10marks)
• If a user checks the first option (Add), the program should display the addition of the
numbers entered in the Text 1 and Text 2 in the text3 if a user clicks to a button
compute.
• If a user checks the second option (Multiplication), the program should display the
addition of the numbers entered in the Text 1 and Text 2 in the text3 if a user clicks to
a button compute.
• If a user checks the third option (Subtraction), the program should display the addition
of the numbers entered in the Text 1 and Text 2 in the text3 if a user clicks to a button
compute.

Page 3 of 4
• If a user checks the fourth option (Division), the program should display the addition
of the numbers entered in the Text 1 and Text 2 in the text3 if a user clicks to a button
compute.
• The program should display nothing in Text1,Text2 and text 3 if a user clicks to a clear
button
• Remember the program should be closed when the user clicks on exit button

19. Given an “Worker” table


WORKER_ID FIRST_NAME LAST_NAME SALARY JOINING_DATE DEPARTMENT
001 Monika Arora 100000 2014-02-20 HR
002 Niharika Verma 80000 2014-06-11 Admin
003 Vishal Singhal 300000 2014-02-20 HR
004 Amitabh Singh 500000 2014-02-20 Admin
005 Vivek Bhati 500000 2014-06-11 Admin
006 Vipul Diwan 200000 2014-06-11 Account
007 Satish Kumar 75000 2014-01-20 Account
Write SQL command to:
a) Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias name as
WORKER_NAME who paid more than 100000. (2Marks)
b) Write an SQL query to fetch “FIRST_NAME” from Worker table in upper case. (1Mark)
c) Write an SQL query to fetch unique values of DEPARTMENT from Worker table (1Mark)
d) Write an SQL query that prints the length of DEPARTMENT from Worker table. (1Mark)
e) Remove all record of workers work on Account DEPARTMENT (1Mark)
f) Write an SQL query to print the FIRST_NAME and LAST_NAME from Worker table into a
single column COMPLETE_NAME. A space char should separate them. (2Marks)
g) Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME
Ascending. (2Marks)
h) Write an SQL query to fetch the count of employees working in the department Admin.
(1Mark)
i) Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
(2Marks)
j) Write an SQL query to print details of the Workers whose SALARY lies between 100000 and
500000. (2Marks)
END!!!
Page 4 of 4

You might also like