Get premium membership and access revision papers, questions with answers as well as video lessons.

Comp 326:Object Programming With Java August 2008 Question Paper

Comp 326:Object Programming With Java August 2008 

Course:Bachelor Of Computer Science

Institution: Kabarak University question papers

Exam Year:2010



KABARAK UNIVERSITY

UNIVERSITY EXAMINATIONS
2009/20010 ACADEMIC YEAR
FOR THE DEGREE OF BACHELOR OF COMPUTER SCIENCE

COURSE CODE: COMP 326
INSTRUCTIONS:
1. Section A is compulsory and has 30 marks.
2. Attempt any TWO questions from Section B. Each question has 20 marks.

SECTION A
QUESTION 1 (30 MARKS)
a) As a young programmer at KPLC what were the five primary goals in the creation
of the Java programming language. (5 marks)
b) Briefly explain the basic structure and the fundamental elements of any java program.
(5 marks)
c) With java a programmer can not assume the use of packages in the program. Define
is a java package and explain any four different java packages. (5 marks)
d) In java programming what is an applet? With the help of a code show how an
applet can be included in any web document. (5 marks)
e) There are several types of events that can happen in a Java program. As an expert
in java explain any five events used in java. (5 marks)
f) A Newly established insurance company is having problems in calculating interest
for its customers. Write a java program to help them find the simple interest.
(5 marks)

SECTION B
QUESTION 2 (20 MARKS)
a) Explain the Importance of java programming language. (4 marks)
b) As a consultant in java programming what is a class constructor? With a code
example explain the process of creating a class constructor. (4 marks)
c) Write a java program to find the prime numbers between 1 and 20. (4 marks)
d) Having learnt and used java for sometime in your own words briefly explain the
history of java to other beginners. (4 marks)
e) What is string? Explain any three types of string functions as used in java
programming. (4 marks)

QUESTION 3 (20 MARKS)
a) When writing java programs identify any four rules one need to consider in naming
variables. (4 marks)
b) Explain how inheritance can be implemented in Java programming.(4 marks)
c) What is a java interface? Explain any three different types of interfaces in java
programming. (4 marks)
d) Explain the advantages of java over other programming languages. (4 marks)
e) Write a java program to add the elements of a 2x2 matrix and print the sum in the
screen. (4 marks)

QUESTION 4 (20 MARKS)
a) As a programmer explain any four different data types used in java programming.
(4 marks)
b) Write a java program to find the L.C.M of any give numbers. (4 marks)
c) What are exceptions? Explain any three types of java exceptions. (4 marks)
d) Programming and scripting are said to be two different things in programming.
Explain the difference between java programming and java script. (4 marks)
e) With the help of a java code explain the use of switch statement in a java program.
(4 marks)

QUESTION 5 (20 MARKS)
a) Explain any four objects oriented programming concepts in relation to java
programming. (4 marks)
b) What is an access modifier? Explain the basic class access modifiers that can be
implemented in any java program. (4 marks)
c) Write a java program to find the greatest out of three numbers. (4 marks)
d) What is a frame in java show with the help of a java code how to add a frame into
your program? (4 marks)
e) With the help of a java code example explain the use of the do- while loop as
used in java programming. (4 marks)






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers