Questions Search

This website covers previous years question papers of various universities and colleges in India. Moreover, the information on admission to various courses from various universities/institutes/colleges are also available. Research paper questions are also updated from time to time. Also the latest teaching faculty plus teachers jobs, Government jobs, Banking Jobs, and other jobs are regularly updated to help jobless candidates. Admit cards of various recruitment of Govt organisation are updated. Search your terms using the search box provided.

Follow by Email

Thursday, March 17, 2016

Uniraj B.Tech 2nd Year Object Oriented Programming May 2008 Question Paper

Looking for Uniraj exam papers asked in previous years? Download here 2008 B.Tech 2nd Year Object Oriented Programming May 2008 Question Paper.
University: Rajasthan University / Uniraj
B.Tech II Year (Sem. IV) Examination, MAY- 2008
Object Oriented Programming
Information Technology

[Time : 3 hours] [Total marks : 80]
[Min passing marks :24]

Instruction :
1. The candidates should ignore all syntax errors in case the output has been asked.
2. The examiner must ignore syntax errors when the question is about writing a program. However, suitable considerations must be given for correctness of the program structure.
UNIT I
1 (a) Differentiate between the following programming paradigms
(1) Aspect Oriented Programming
(2) Dynamic Programming
(3) Functional Programming
(4) Logic Programming
(5) Object- Oriented Programming
(6) Event Driven Programming
Give one characteristic of each which makes one of them different from others. [2*6+6]


OR

1 (a)Explain the general construction of a program written in an object oriented programming language. How is it different from a program in language like C or FORTRAN. [4+4]
(b) List major differences in C++ and JAVA programming language in terms of:
(i) Program Structure.
(ii) Compilation.
(iii) Run Time. [8]


UNIT II

2 (a) Create a class Rational with the following feature:
(1) Use integer variables to represent the private data of the class- the numerator and the denominator.
(2) Provide a constructor that enables an object of this class to be initialized when it is declared.
(3) The constructor must contain default values in case no initial values are provided.
(4) Constructor should store the fraction in reduced form i.e. if the numerator is 2 and the denominator is 4, it should be stored as 1 and 2 respectively. [2*4=8]
(b) Provide public member functions that perform each of the following tasks:(All outputs to be stored in reduced form and that a library function int_lcm (int, int) for finding LCM of two integers is available).
(1) Adding two rational number.
(2) Subtracting two rational numbers.
(3) Multiplying two rational numbers
(4) Dividing two rational numbers.
In all the cases output must be displayed as numerator/denominator and not in terms of real number. [2*4=8]

OR

2 (a) Find output of the following program.
(1) #include
using std::cout;
using std::endl;
int main()
{
int x;
for(x=1; x<=10; x++)
{ if(x==5) break;
cout< }
cout<<"\nout when x became" < return 0;
}//end function main
(2) #include
using std::cout;
using std:: endl;
int main()
{
int counter=1;
do {
cout< } while(++counter<=10);
cout< return 0;
} // end function main

(3) #include
using std::cout;
using :: endl;
int main()
{
for(int x==1; x<=10; x++)
{ if(x==4) continue;
cout< }
cout< return 0;
} [2+3+3]

[8]
(b) Find the errors in the following code fragment and explain how to correct the errors:
(1) x=1;
while(x<=10)
x++;
}
(2) for(y=0.1; y!-1.0; y+=0.1)
cout<
(3) switch (n) {
case 1:
cout<<”The number is 1”< case 2:
cout<<”The number is 1 or 2”< break;
}

(4) The following code should print the values 1 to 10
n=1;
while(n<10)
cout< [2+3+3]
UNIT III


3 Answer the following questions in maximum of five lines:
(1) What is a friend function?
(2) What is the advantage and disadvantage of friend functions?
(3) What is virtual class and virtual function?
(4) What is meant by Run time Type Casting and Dynamic Casting?
(5) What are Namespaces?
(6) What are the scope rules for nested classes?
(7) What are exceptions and what is meant by exception handling?
(8) What is a template?
[2*8]


OR

3 Answer the following questions in maximum of ten lines:
(1) Distinguish between static binding and dynamic binding. Explain the use of virtual function and the vtable in dynamic binding.
(2) Distinguish between virtual functions and pure virtual functions.
(3) Discuss the relative merits of using protected access v/s private access in the base class.
(4) What is the relationship between functions templates and overloading?

UNIT IV

4 What is the difference between the following in JAVA?
(1) Static class, Public class, and class with any keyword. and Static data member
(2) Static function and public function and public static function.
(3) Keyword Implements and keyword Extends
(4) Abstract classes and Concrete classes.
Give one example in each case to illustrate the difference 2*4+2*4=16
OR

4 (a) What is meant by function overriding in JAVA? How is it different from function overloading? Give example of each case
(b) Explain the effect of using the keyword final with a class definition?
(c) Under what circumstances the keyword super is used in JAVA? Explain with an example.
(d) How objects are created in JAVA? Explain the use of constructor in JAVA. 4*4




5 (a) How classes in a package are arranged in JAVA. Explain with an example. Draw the class tree and the directory tree of the package.
(b) What is JAVA applet? How is it different from a JAVA program? Explain. [8]

OR

5 Find output of the following program
(a) public class StringMiscellaneous
{ public static void main(String args[])
{
String s1=”hello there”
char charArray[]=new char[5];
System.out.printf(“\n Length of s1:%d”, s1.Length()) System.out.print(“\n The string reversed is “);
for(int Count – s1.length()-1; count>=0; count--)
System.out.printf(“%s”, s l.charAt(count));
s1:getChars(0, 50 ,charArray);
System.out.print(character);
System.out.println();
}//end main
} //end class StringMiscellaneous
(b) public class StringBufferCapLen
{
public static void main(String args[])
{
StringBuffer buffer= new StringBuffer(“Hello, how are you?”);
System.out.print(“buffer=%s\nlength=%d\ncapacity=%d\n\n”, buffer.toString(), buffer.length(), buffer.capacity() );
buffer.ensure Capacity(75);
System.out.printf(“New capacity=%d\n\n” Buffer.capacity());
buffer.length(), buffer.to String());
}//end main
}//end class StringBufferCapLen

No comments:

Post a Comment

Pen down your valuable important comments below