RGTU Question Papers BE
Object Oriented Technology IV Sem June 2011
Note: The question paper divided into five units. Each Unit carry an internal choice. Attempt one
question from each unit. Thus attempt five question in all .All question carry equal marks.
Assume suitable data whenever necessary.
1. (a) discuss the non-object oriented feature of c++ with programming example. Also state the merits
and demerits of object oriented methodology.
(b) Explain in line function and the situations where inline expansion may not work and why?
(c) What is the main drawback of structured programming? How oop address this issue?
2. (a) Define the following terms and give an example to show its realization in c++:
(ii) Class variables class functions
(iii) Repeated inheritance
(b) What is the difference between register variable and automatic variable? Explain with example.
What are other storage classes for variable?
3. (a) Discuss the advantage of scope resolution operators.
It is useful when the member data of a class whose member function is invoked in derived class is
Public or private?
(b) Explain with example as to how would you be able to identify objects and class in program.
4 (a) Write a C++ program to convert the polar co-ordinates into rectangular co- ordinates. (hint: polar
co- ordinates (radius, angle ) and rectangular co- ordinates (x,y) where x=r* cos (angel )and
(b) Discuss in brief the following:
(ii) Recursive association
(iii) Many to many associations
(iv) Argument passing
5. (a) Discuss the role of inheritance in object oriented programming . What is public and derivation?
(b) Explain the concept of operator – overloading. Illustrate operator – overloading concept to
6. (a) Explain the meaning of polymorphism . How is polymorphism achieved at run time? Explain with
(b) Define a class Date with three variables for day , month and year .
(i) Overload the operators <<,>> to read and print Date object .
(ii) Overload > to compare two dates
7. (a) Describe how can files be opened and closed explicitly in a program .
(b) Write a program which asks for a file name from the Keyboard, opens a file with that name for
output reads a line from the keyboard character by character and writer the line onto the file.
© The keyboard ‘virtual’ can be used for functions as well as classes in C++. Explain the two different
uses. Given an example of each.
8. (a) Explain the concept of streams in C++ and given the hierarchy of different types of stream .
(b) Write a program to cerate a file to store the information “Data structure “In the same program,
read the information in the created file.
9 (a) Explain method overloading and method overriding with giving suitable example.
(b) What is the need and advantage of templates? What is the difference between function templates
and class template?
© Write a program to read three numbers X,Y and Z and evaluate R given by :
R= z/ (x-y)
Use excepting handling to throw an exception in case division by zero is attempted.
10 (i) compare the features of C++ versus Java.
(ii) Define classes and methods in Java.
(iii) Explain the interface concept in Java.
(iv) What is the propose of package? Name some packages.