2006 Anna University B.E computer science and engineering CS237-OBJECT ORIENTED PROGRAMMING -2 Question paper
B.E/B.Tech DEGREE EXAMINATION
[blink]CS237-OBJECT ORIENTED PROGRAMMING
1.What is meant by data hiding.
2.Name atleast two OOPS languages other than C++.
3.How is “This pointer”useful in programming?
4.What is meant access specifier?
5.What is friend function?
6.Name the various types of multiple inheritance.
7.Is template a basic feature of C++.Justify your answer.
8.What are the classes in iostream.h header files?
9.Does Java support multiple inheritance justify your answer.
10.What is abstact class in Java?
11 (i) What is the main draw-back of structured programming? How OOP address this issue?
(ii) What are the elements of OOPS? How do these make OOPS approach best suited to address real world problems?
(iii)Briefly explain the Java runtime environment.
12(a) Explain copy constructor.
Write a program which reads a complex number and copy that into another. Use copy constructor for writing program.
(b) (i) What is the difference between register variable and automatic
Variable explain with example? What are other stroage classes for variables?
(ii)What is inline funtions? Explain with example.
What is the output of the following segment.
Static int m=1;
13 (a) (i) Write a program which reads the bio-data and records of two
Sessional and then print final result. Make seperate class for bio-data,sessional 1, sessional 2 and final result. Sessional 1 and sessional 2 classes are derived form bio-data class. Find result in defined from sessional 1 and sessional 2 classes.
(ii) Explain the concepts identify in the program.
(b) (i) What is meant by overloading? How is operator overloading works?
(ii) Write a program to add 2 complex numbers using operator overloading. What are the operators that cannot be overloaded in C++?
14 (a) (i) Write a program which generate a template class by which one can perform integer type data addition and float type data additio also.
(ii) What is the need for and advantages of templates? What is the difference between function templates and class template?
(b) (i) What is exception handling? Explain
(ii) For handling exception what type of construct are available in C++.
(iii) Explain the concept of streams in C++ and give the hierarchy of different types of stream.
15 (a) Defines interfaces in Java. How interfaces are implemented? How they can be accessed? How to apply interfaces? What is meant by extension of interfaces? Explain with an example.
(b) (i) How is object class created in Java environment? Discuss on objects in Java.
(ii) What is meant by overloading objects? How are rested classes used in Java?