šŸ“˜ Access 10,000+ CBC Exams With Marking Schemes

Prepare your learners for success! Get CBC-aligned exams for Grades 1–9, PP1–PP2, Playgroup and High School - all with marking schemes.

Browse Exams

Instant download • Trusted by 100,000+ teachers • Updated weekly

Object Oriented Programming Techniques(Dbit 113/ Dcis 211) Question Paper

Object Oriented Programming Techniques(Dbit 113/ Dcis 211) 

Course:Computer Information Systems And Business Information Technology

Institution: Kenya Methodist University question papers

Exam Year:2010



TIME : 2 HOURS
INSTRUCTIONS Answer Question ONE and any Other TWO Questions

Question 1
a) Briefly explain what recursion. (2marks)
b) Write function that will return the factorial of a number. (4marks)
c) Write a Java program to convert temperature from degree Celsius to Fahrenheit. (6marks)
d) Define the following terms:
i) Abstract class
ii) Virtual method
iii) Function overloading (6marks)
e) Using a pseudocode write an algorithm that will accept an array of numbers from the keyboard and print them in ascending order. (4marks)
f) Provide a Java statement to declare an in array and initialize its’ elements to 6, 2, 54, 65 and 50 respectively. (2marks)
g) Write a Java program that asks the user to enter the total marks of the student. The program then grades the marks as follows:
0-50 Fail
51-100 Pass (6marks)

Question 2
a) Using appropriate examples, explain the following object oriented concepts.
i) Object
ii) Class
iii) Encapsulation
iv) Abstraction (4marks)
b) Declare a class called bankAccount to include at least two data members and two methods. Using it to show write a program which using a menu can perform the following tasks:
i) perform a deposit
ii) perform a withdrawal
iii) give a bank balance (16marks)

Question 3
a) Define the following terms.
i) Constructor
ii) Static
iii) Protected
iv) Private (4marks)
b) A college has list of test results (1=pass,2=fail) for 20 students. Write a program in java to that analyzes the results and prints ā€œRaise Tuitionā€ if more than 75% of students pass, else print ā€œinvestigate the course for mediocre performanceā€. (16marks)

Question 4
a) Differentiate between the following terms.
i) Parameter and argument
ii) Method and operation (4marks)
b) Write a java program with a super class called Polygon. The class should at least have one virtual method. Define another class called Rectangle that inherits from the class polygon. Instantiate an object of class Rectangle. Show how the object instantiated inherits from the super class. (16marks)






More Question Papers


Exams With Marking Schemes

End Term 3 Exams

Mid Term Exams

End Term 1 Exams

Opener Exams

Full Set Exams



Return to Question Papers