Saturday 13 April 2013

// // Leave a Comment

OBJECT ORIENTED PROGRAMMING(C++ AND JAVA)-MARCH-2009


THIRD SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/TECHNOLOGY-MARCH, 2009
OBJECT ORIENTED PROGRAMMING(C++ AND JAVA)
PART-A
(Maximum marks:15)
v  Answer the following questions in one or two sentences:
1.List any three applications of OOP.
2.What is a token?Give two examples.
3.Write any three operators that cannot be overloaded.
4.What is inheritance?
5.What is a stream?
6.What is the difference between iso:ate and iso::app?
7.Write any two demerits of java.
8.What is Unicode?
9.Write the syntax of applet tag in HTML.
10.List any three features of applets.
PART-B
(Maximum marks:60)
(Answer one full question from each unit)
Unit-1
v  (a)Distinguish between constructor and destructor.Explain with example dynamic constructor.(6)
          (b)What is friend function?How friend functions are declared?Write any three characteristics of friend function.(6)
OR
v  (a)Write the general form of a class declaration.Write examples for class declaration and object creation.(6)
(b)Explain the use of scope resolution operator in C++ with examples.(6)

Unit-2
v  (a)What is function overloading?Write overloaded function to find the sum of two integers and sum of two complex numbers.(6)
(b)Write an example for classes within class and explain how the class members are accessed.(6)
         
OR
v  (a)A complex number class contain the member variables real_part and imaginary_part.Write a C++program to add two complex number objects by overloading the ‘+’operator.(6)
          (b)Write the syntax for defining derived classes and explain it.(6)
UNIT-3
v  (a)What is the use of the function seekg()Explain the parameters of seekg()function..(6)
          (b)Write a C++program to create a text file to store the names of a set of students by reading the names from the keyboard.(6)
OR
v  (a)Distinguish between put()and write()functions in C++.Write and explain examples for using put()and write().(6)
          (b)Write a C++ program.
(i)to define a student class with member variables register number,name and mark;and member functions getdata()and putdata()to read and write the member variables respectively.
(ii)to create a file to store a set of student objects.(6)
UNIT-4
v  (a)What is the syntax for creating classes in java?Write an example.(6)
(b)Explain different ways of passing variables to methods.(6)
OR
v  (a)Explain with example the super keyword.(6)
          (b)Write a java program to display the multiplication table of a number which is given as command line argument.(6)
UNIT-5
v  (a)Explain the life cycle of a thread.(6)
          (b)Write a java program to read a set of numbers from the keyboard,store them into an array and then print them in reverse order.(6)
OR
v  (a)Explain the three primary methods in the thread class used to control a thread.(6)
(b)Write a java program to check whether a given string is palindrome or not and display corresponding message.(6)
        

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments:

Post a Comment