RGPV Question Paper
CS Object Oriented Technology IV Sem June 2011
Note:Attempt any 5 questions.Attempt one question from each Unit ,All question Carry equal marks
Q.1 (a) Discuss the non-object-oriented features of C++ with programming examples. Also state the merits and demerits of object oriented methodology .
(b) Explain Inline functions and the situations where inline expansion may not work and why?7
(c) What is the main drawback of structured programming ? How OOP address this issue ? 6
Q.2 (a) Define the following terms and give an example to show its realization in C++ : 10
(ii) Class variables and class functions
(iii) Repeated inheritance
(b) What is the differences between register variable and automatic variable ? Explain with example. What are other storage classes for variables ? 10
Q.3 (a) Discuss the advantages of scope resolution operator. Is it useful when the member data of a class whose member function is invoked in derived class is public or private ? 10
(b) Explain with example as to how would you be able to identify objects and classes in program ? 10
Q.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(angle) and y=r*sin(angle) 10
(b) Discuss in brief the following :
(ii) Recursive association
(iii) Many to many association
(iv) Argument passing
Q.5 (a) Discuss the role of inheritance in object oriented programming . What is public and private derivation ? 10
(b) Explain the concept of operator-overloading. Illustrate operator-overloading concept to concatenate strings? 10
Q.6 (a) Explain the meaning of polymorphism . How is polymorphism achived at run time ? Explain with coding ? 10
(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.
Q.7 (a) Describe how can files be opened and closed explicitly in a program ? 6
(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 write the line ontothe file ? 7
(c) The keyword “virtual” can be used for functions as well as classes in C++ . Explain the two different uses. Give an example of each. 7
Q.8 (a) Explain the concept of streams in C++ and give the hierarchy of different types of stream ? 10
(b) Write a program to create a file to store the information ” Data Structure” , In the same program, read the information in the created file ? 10
Q.9 (a) Explain method Overloading and method overriding with giving suitable example ? 5
(b) What is the need for and advantages of templates ? What is the difference between functions templates and class templates? 5
(c) Write a program to read three numbers x, y, and z and evaluate R given by : 10
R = z / (x-y)
Use exception handling to throw an exception in case division by zero is attempted ?
Q.10 (i) Compare the features of C++ verse Java . 5
(ii) Define classes and methods in Java 5
(iii) Explain the interface concepts in Java. 5
(iv) What is the purpose of package ? Name some packages. 5