Saturday 13 April 2013

// // Leave a Comment

OBJECT ORIENTED PROGRAMMING(C++ AND JAVA)-OCTOBER-2008


THIRD SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/TECHNOLOGY-OCTOBER, 2008
OBJECT ORIENTED PROGRAMMING(C++ AND JAVA)
PART-A
(Maximum marks:15)
v  Answer the following questions in one or two sentences:
1.What is a dynamic binding?
2.What is reference variable?
3.What is operator overloading?
4.What is derived class?
5.Compare pointers to base classes and pointers to derived classes.
6.What are input and output streams?
7.What is final variable?
8.What is an interface?
9.Define applet.
10.What is servlet?
PART-B
(Maximum marks:60)
(Answer one full question from each unit)
Unit-1
v  (a)List any six types of operators in C++ with one example for each.(6)
          (b)Write the method of creating objects and accessing class members in C++  with an example.(6)
OR
v  (a)What is a constructor?Explain overloaded constructors with examples.(6)
(b)Write the method of passing objects as arguments(i)to a member function and(ii)to a non-member function.Also explain how the objects can be used within the passed function.(6)

Unit-2
v  (a)Distinguish between hierarchial inheritance and hybrid inheritance .Write an example for implementing hierarchial inheritance in C++.(6)
(b)A time class contains the member variables hour,minute and second.Write a C++ program to increment the time by overloading the ++ operator.(6)
         
OR
v  (a)Distinguish between public and protected across specifiers.(6)
          (b)Explain with example unary operator overloading using(i)member function and(ii)friend function.(6)
UNIT-3
v  (a)List any six modes of opening a file in C++and write their meaning.(6)
          (b)Distinguish between get()and read()functions in C++/Write and explain example for using get() and read().(6)
OR
v  (a)Write the syntax and examples for opening a file for(i)input only and(ii)output only.(6)
          (b)A student class contains member variables register number,name and mark;and member functions getdata() and putdata() to read and write the variables respectively.A file “student.dat”contains a set of such student objects.Write a C++ program to read this file and display the data.(6)
UNIT-4
v  (a)Explain any three control statements in Java.(6)
(b)Explain access specifiers in java.(6)
OR
v  (a)Explain how objects are destroyed in java.(6)
          (b)Explain with example the use of this keyword in Java.(6)
UNIT-5
v  (a)Explain with example the necessity of multiple catch block and finally block in java.(6)
          (b)Write java code to create an applet that reads a name from the keyboard and display the message ‘good morning’followed by the name read.(6)
OR
v  (a)Which are the two ways to implement threading in java program?Write examples.6)
(b)Write a java program to read a line of text from the keyboard and display the count of vowels.(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