Education  
   
   
   
  Entertainment  
   
   
   
   
  Advertisements  
   
   
   
   Annauniversity.Info
   e d u c a t i o n    ' n '    e n t e r t a i n m e n t
 
Model Question Papers Home page
 
CS 237 - OBJECT ORIENTED PROGRAMMING

ANNA UNIVERSITY :: CHENNAI - 600 025

MODEL QUESTION PAPER

B.E. DEGREE PROGRAMMES

CS 237 - OBJECT ORIENTED PROGRAMMING

Time: 3hrsMax 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.

(OR)
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.

(OR)
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.

(OR)
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.

(OR)
15.b)

Explain the concept of nested classes in Java with a suitable example.

 
Advertisement Links by Google
 
Google
Home | About | Contact | College Syllabus | Question Papers | Aptitude Test | Games | Movies | Mobiles | E-Mails | Site Map