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

Comp 212:Object Oriented Programming August 2010 Question Paper

Comp 212:Object Oriented Programming August 2010 

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 212


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 senior programmer in C++, write a program to find the Simple Interest.
(5 marks)
b) What is a stream? Explain the standard input and output streams giving code
examples of each. (5 marks)
c) Data in a program can be manipulated depending on the users needs, in your own
understanding what is type conversion? Explain the two ways of achieving type
conversion in C++ programming. (5 marks)
d) What is an array? Explain with the help of a code example how to declare and access
the elements of an array in any C++ program. (5 marks)
e) Being a consultant in programming; explain the basic structure of the C++ program.
(5 marks)
f) Decision making can be done in different ways in C++ programming, explain with a
code example how the switch statement is used in C++. (5 marks)


SECTION B
QUESTION 2 (20 MARKS)
a) Explain the following features of object oriented programming as used in C++.
(4 marks)
i. Polymorphism
ii. Data Abstraction
b) Operators play a very important role in programming. Explain any four Bitwise
operators used in C++ programming. (4 marks)
c) As a programmer briefly explain the differences between the compiler language and
the assembly language. (4 marks)
d) Explain in detail the difference in local and global variables as used in C++.
(4 marks)
e) Explain any four types of data types used in C++ programming. (4 marks)


QUESTION 3 (20 MARKS)
a) Write a C++ program to find the greatest out of three numbers. (4 marks)
b) Explain the difference between objects and classes as used in C++. (4 marks)
c) What is a storage class? Discuss the three types of storage class variables in C++
giving examples. (4 marks)
d) Explain giving example the Constants and Variables used in C++. (4 marks)
e) Explain the different ways of creating objects in a C++ program with the help of a
code example. (4 marks)


QUESTION 4 (20 MARKS)
a) Write a C++ program to find the greatest common divisor of any given numbers.
(4 marks)
b) What is an access specifier? Explain the three basic C++ access specifiers.
(4 marks)
c) With the help of a code explain the IF…ELSE statement as used in C++ programming.
(4 marks)
d) Briefly explain pointers and how they are used in C++. (4 marks)
e) Explain the two different types of arguments passing used in C++ functions.
(4 marks)

QUESTION 5 (20 MARKS)
a) Write a C++ program to find the area of a circle. (4 marks)
b) Variables are used almost in all parts of a program. Highlight any four rules for
naming variables in C++. (4 marks)
c) What are manipulators? Explain any two types of manipulators used in C++.
(4 marks)
d) With the help of a code explain the DO…WHILE loop as used in C++ programming.
(4 marks)
e) Explain with the help of a code example the use of constructors in C++ 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