Rajiv Gandhi Proudyogiki Vishwavidyalaya 2011 B.E Computer Science and Engineering object oriented theory cs-403 s - Question Paper
CS-403 (N) B.E. (Forth Semester)
EXAMINATION, June-2011
(Computer Science & Engg. Branch)
OBJECT ORIENTED TECHNOLOGY CS-403
Time : 3 Hours Max. Marks : 100 Min Marks : 35
Note : The ques. paper is divided into 5 Units .Each unit carries an internal option. Attempt 1 quetion from every Unit . Thus attempt 5 ques. in all . All ques. carry eqaul marks. presume suitable data whenever necessary .
Unit-I
Q.1(a) explain the non-object-oriented features of C++ with programming examples. Also state the merits and demerits of object oriented methodology ?[7]
(b) discuss 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 problem ? [6]
Or
Q.2 a) describe the subsequent terms and provide an example to show its realization in C++ : [10]
(i) Encapsulation
(ii) Class variables and class functions
(iii) Repeated inheritance
(iv) Overloading
(b) What is the differnces ranging from register variable and automatic variable ? discuss with example. elaborate other stroage classes for variables ? [10]
Unit-II
Q.3 (a) explain 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) discuss with example as to how would you be able to identify objects and classes in program ? [10]
Or
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) explain in brief the subsequent :[10]
(i) Association
(ii) Recursive association
(iii) Many to many association
(iv) Argument passing
Unit-III
Q.5 (a) explain the role of inheritance in object oriented programming . What is public and private derivation ? [10]
(b) discuss the concept of operator-overloading. Illustrate operator-overloading concept to concatenate strings? [10]
Or
Q.6 (a) discuss the meaning of polymorphism . How is polymorphism achived at run time ? discuss with coding ? [10]
(b) describe a class Date with 3 variables for day, month and year.[10]
(i) Overload the operators << , >> to learn and print Date object.
(ii) Overload > to compare 2 dates.
Unit-IV
Q.7 (a) define 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++ . discuss the 2 various uses. provide an example of every. [7]
Or
Q.8 (a) discuss the concept of streams in C++ and provide the hierarchy of various kinds of stream ? [10]
(b) Write a program to creat a file to store the info " Data Structure" , In the identical program, learn the info in the created file ? [10]
Unit-V
Q.9 (a) discuss method Overloading and method overriding with giving suitable example ? [5]
(b) What is the need for and advantages of templates ? What is the difference ranging from functions templates and class templates? [5]
(c) Write a program to learn 3 numbers x, y, and z and evaluate R provided by : [10]
R = z / (x-y)
Use exception handling to throw an exception in case division by zero is attempted ?
Or
Q.10 (i) Compare the features of C++ verse Java . [5]
(ii) describe classes and methods in Java [5]
(iii) discuss the interface concepts in Java. [5]
(iv) What is the purpose of package ? Name a few packages.[5]
RGPV BHOPAL MP
CS-403 (N) B.E. (Forth Semester)
EXAMINATION, June-2011
(Computer Science & Engg. Branch)
OBJECT ORIENTED TECHNOLOGY CS-403
Time : Three Hours Max. Marks : 100 Min Marks : 35
Note : The question paper is divided into five Units .Each unit carries an internal choice. Attempt one quetion from each Unit . Thus attempt five questions in all . All questions carry eqaul marks. Assume suitable data whenever necessary .
Unit-I
Q.1 (a) Discuss the non-object-oriented features of C++ with programming examples. Also state the merits and demerits of object oriented methodology . 7
(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
Or
Q.2 (a) Define the following terms and give an example to show its realization in C++ : 10
(i) Encapsulation
(ii) Class variables and class functions
(iii) Repeated inheritance
(iv) Overloading
(b) What is the differnces between register variable and automatic variable ? Explain with example. What are other stroage classes for variables ? 10
Unit-II
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
Or
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 :
(i) Association
(ii) Recursive association
(iii) Many to many association
(iv) Argument passing
Unit-III
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
Or
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.
Unit-IV
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
Or
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 creat a file to store the information " Data Structure" , In the same program, read the information in the created file ? 10
Unit-V
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 ?
Or
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
Earning: Approval pending. |