How To Exam?

a knowledge trading engine...


Centre for Development of Advanced Computing%28C-DAC%29 2004 M.C.A -110 Object Oriented Programming - Question Paper

Saturday, 02 February 2013 01:05Web

End-Term exam
Second Semester [MCA] – DEC 2004

Paper Code: MCA-110 Subject: Object Oriented Programming
Time: three Hours Maximum Marks: 60

Q. one (a) discuss the subsequent features of OOPS :- 8
(i) Message Passing
(ii) Extensibility
(iii)Delegation
(iv) Genericity
(b) discuss overloading of new and delete operators by giving examples. 4

Q. two (a) Write a program that illustrate the mechanism for handling exceptions in the
vector class, while creating its objects and accessing its elements for studying or
writing. The program should overload the operator [ ] to simulate the operations on
the user described data kinds. 6
(b) Write a program that reads a sequence of names, 1 per line, and then sorts
and prints them. 6

Q. three (a) Implement a vector class with a default constructor, a destructor, overloaded
assignment operator, subscript operator, stream insertion operator and stream
extraction operator.
6
(b) discuss the concept of friend function and friend class by giving examples.
6

Q. four (a) Write a program of an exam database using inheritance which has three
classes namely person, learner and examination. The learner class inherits the properties
of person class and examination class inherits the properties of learner class directly and
properties of person class indirectly. 6
(b) What is polymorphism and how is it achieved by means of virtual functions?
provide an example. 6

Q. five (a) Do derivation and friendship mean the same? elaborate the similarities and
dissimilarities ranging from the two? 4
(b) define how an object of a class that contains objects of other classes are
created. 3

(c) Briefly discuss the working of inline functions. Also explain their merits and
demerits. When Should functions be declared inline? 3

Q. six (a) What is a container class? discuss homogenous, heterogeneous and vector
classes. Write a program to implement a vector class template. 6
(b) Implement a string class. every object of this class will represent a character
string. Data members are the length of the string and the true character string. In
addition to constructors, destructor, access functions, and a print function, include
a “subscript” function. 6

Q. seven describe the following:- 6
(i) Wild pointers
(ii) Garbage
(iii)Dangling Reference
Consider the subsequent program:

#include
void main()
{
int * a;
const in * b;
int * const p;
int c=2, d=3
cout<*b=10;
b=new int;
*b=10
delete b;
cout<< *b;
a= new int [10];
a[9] = 20;
a[10]= 30;
a= new int[5];
a++;
++b;
cout<< *a;
}

In the above program obtain out where all garbage, dangling reference and wild
pointers exists. Identify statements which are treated as erroneous by the
compiler.
(b) Briefly discuss the exception handling constructs. Write a program which
binds a pointer to base class’ object to base or derived objects at runtime and
invoking respective members if they are virtual. 6

Q. eight Write a class template container to do binary tree operations (Create, print,
traverse and search). The traverse should be in inorder, preorder and postorder.
12


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Centre for Development of Advanced Computing%28C-DAC%29 2004 M.C.A -110 Object Oriented Programming - Question Paper