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

Comp 212:Object Oriented Programming November 2009 Question Paper

Comp 212:Object Oriented Programming November 2009 

Course:Bachelor Of Education Science

Institution: Kabarak University question papers

Exam Year:2009



KABARAK UNIVERSITY EXAMINATIONS
2009/2010 ACADEMIC YEAR
FOR THE DEGREE OF BACHELOR OF EDUCATION SCIENCE
COURSE CODE: COMP 212


INSTRUCTIONS:
Question one is compulsory and has 30 marks. Attempt any other two questions

QUESTION 1 (30 MARKS)

a) What is Object oriented programming? (3 marks)
b) Differentiate between an object and a class. (3 marks)
c) Define function and show the code used to declare a function in C++ (3 marks)
d) As a programmer explain the structure of any C++ program (6 marks)
e) OOP is becoming popular to all software programmers, highlight any six features
of the OOPs. (3 marks)
f) Programming with C++ can be a good adventure for beginners. Explain the three
access specifiers used in C++. (2 marks)
g) What is a stream? Briefly explain the standard input stream used in C++(3 marks)
h) Define a variable giving an example of a code to declare variables in C++(3 marks)
i) What are comments and how are comments written in C++? (3 marks)


QUESTION Two (20 MARKS)

a) Explain the differences between high-level and low-level programming
languages (4 marks)
b) What is a structure and how are structures declared in C++ (4 marks)
c) Giving examples of each; explain the arithmetic and compound operators used
in C++. (4 marks)
d) Write a C++ program to find the simple interest. (4 marks)
In C++ programming how can you differentiate between local and global variables
(4 marks) 3

QUESTION Three (20 MARKS)

a) Differentiate between encapsulation and data abstraction. (4 marks)
b) Highlight the main functions of a computer program (4 marks)
c) In programming how would you differentiate between Pass By Value and Pass By
Reference as used in C++ ? (4 marks)
d) Every programming language has its own rules to be followed; highlight the rules
for defining variable in C++. (4 marks)
e) Explain in brief the Object Oriented Programming paradigm (4 marks)
QUESTION Four (20 MARKS)

a) Write a code explaining how the FOR Loop as used in C++. (4 marks)
b) Write a C++ program to calculate circumference. (4 marks)
c) What is an array? With the help of a code show hoe an array is declared in C++.
(4 marks)
d) Write a C++ program to find the product of two numbers. (4 marks)
Define polymorphism explaining two advantages of polymorphism. (4 marks)

QUESTION Five (20 MARKS)

a) Explain any four data types used in C++. (4 marks)
b) Define inheritance explaining the two types of inheritance in C++ (4 marks)
c) With the help of a code example explain the use of the IF…..ELSE Statement in
C++. (4 marks)
d) Explain any two advantages of encapsulation. (4 marks)
e) What is type casting and how is it achieved in C++ (4 marks)






More Question Papers


Popular Exams



Return to Question Papers