ANNA UNIVERSITY :: CHENNAI
B.E. CSE
CS 237 - OBJECT ORIENTED PROGRAMMING
Time: 3hrs Max Marks: 100
Answer all Questions
PART - A (10 x 2 = 20 Marks)
1. How are data and functions organised in an object oriented programming?
2. Compare function overloading and default arguments.
3. What are the uses of references in functions?
4. What is dynamic binding?
5. Compare private and public access specifiers in a class.
6. Distinguish between overloaded functions and function templates.
7. What is this pointer? How is it available to member functions of a class?
8. Can the parameter of a copy constructor be passed by value? Justify your answer.
9. Compare constructor conversion and operator conversion.
10. What is the difference between system . out . print and system . out . println in Java?
PART - B (5 x 16 = 80 Marks)
11. Explain in detail the following principles of object oriented programming
(i) Data encapsulation and data hiding
(ii) Inheritance and polymorphism
(iii) Generic programming.
12.a) Create a class complex to represent complex number with overloaded addition and multiplication operators. Use them in a main program.
12.b) Define a class string with appropriate constructors, destructor and overloaded +, =, and = = operators use them in a main driver program.
13.a) What are the different forms of inheritance? Give example for them.
13.b) Create an abstract base class shape with two members base and height, a member function for initialization and a pure virtual function to compute area ( ). Derive two specific classes Triangle and Rectangle which override the function area ( ). Use these classes in a main function and display the area of a triangle and a rectangle.
14.a) Write a C++ program containing a possible exception. Use a try block to throw it and a catch block to handle it properly.
14.b) Create a data class using Java with the following capabilities.
Out the date in multiple format such as
(i) dd - mm - yy
(ii) June 14, 2002.
15.a) Write a Java class point to represent a two dimensional point (x, y). Extend it to a class circle with its centre as the point and an additional radius member and extend further to a class cylinder with additional height member.
15.b) Explain the concept of nested classes in Java with a suitable example.
Anna University Question Papers,Computer Science Engineering Question Papers,Electronics and Communication Engineering Question Papers,Information Technology Question Papers,Civil Engineering Question Papers,Mechanical Engineering Question Papers,Anna University Question Chennai Papers,Anna University trichy Question Papers
0 comments :
Post a Comment