0% found this document useful (0 votes)
15 views2 pages

2005 Annauniversity

The document contains examination questions for Object Oriented Programming for both Computer Science and Electrical and Electronics students at Anna University in 2005. It includes questions on concepts such as data abstraction, class declaration, polymorphism, and operator overloading, as well as programming tasks involving templates and class methods. The questions are divided into two parts, with Part A focusing on definitions and concepts, and Part B requiring detailed explanations and programming implementations.

Uploaded by

naacc3.klnce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

2005 Annauniversity

The document contains examination questions for Object Oriented Programming for both Computer Science and Electrical and Electronics students at Anna University in 2005. It includes questions on concepts such as data abstraction, class declaration, polymorphism, and operator overloading, as well as programming tasks involving templates and class methods. The questions are divided into two parts, with Part A focusing on definitions and concepts, and Part B requiring detailed explanations and programming implementations.

Uploaded by

naacc3.klnce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

2005 Anna University B.

E Computer Science
CS 237-OBJECT ORIENTED PROGRAMMING

PART A

1.Why is OOP methodology considered to be the better approach for real life problems?
2.What are the use of pointers in C++?
3.How do objects interact?
4.What is the differences between a constructor and destructor?
5.Give atleast two examples of compile time polymorphism.
6.Why is the derived class constructor called before the base class Constructor?
7.Give the syntax of declaring a function template.
8.What are input and ouput streams?
9.What are the three kinds of class members?
10.What is meant by member access modifiers?

PART B
11 (i) Write a program that generates a template class by which one can perform integer type data addition and
float type data addition also.
(ii) How are unusaul error conditions avoider using C++?
12(a) What are the elements of object oriented programming? Discuss them in detail.
(b) What are the various data types allowed in C++? Give one example for each type.
13 (a) (i) Using the concept of function overloading,write a program in C++ to find the maximum of three
integers and three float numbers
(ii) Which are the C++ operators which cannot be overloaded.
14.(a) (i) Write a program which initialised 10 and 200 to member data and then calculate the sum of these.
(ii) Write a program which reads a complex number copy that into another. Use copy constructor for writing
program.
(b) (i) What is the function of this pointers?
(ii) What do you understand by static member and static function? How to declare them?
15.(a) (i) Specify the accesss modifiers of the class members.
(ii) Give the general form of an interface and how is it implemented.
(b) (i) Give two parts of method declaration. How is a static method invoked? When will the method complete
execution and return to the caller? How will methods return more than one result?
(ii) Write a program to compute the volume of a box.

2005 Anna University B.E Electrical and Electronics


EE 237 — OBJECT ORIENTED PROGRAMMING Question paper

PART A — (10 ? 2 = 20 marks)


1. Define Data abstraction with respect to C++.
2. How a class is declared?
3. Name the input and output statements in C++.
4. What is a scope resolution operator and how it can be used for global variable?
5. What are the two types of the members of the class and how are they declared?
6. What is meant by binding?
7. Can array become private member of class? How?
8. What is meant by anonymous union?
9. What is a static data member?
10. What is meant by polymorphism?

PART B — (5 ? 16 = 80 marks)
11. Describe the principal features of object–oriented programming. (16)
12. (a) (i) Illustrate the reserved word inline with two examples. (8)
(ii) Explain the constructors and destructors. (8)
Or
(b) Write a C++ program to implement Stack and its operations PUSH and POP. (16)
13. (a) (i) Define Friend class and specify its importance. Explain with suitable example. (8)
(ii) Explain the operators used for dynamic memory allocation with examples. (8)
Or
(b) Explain operator overloading with the implementation of Complex numbers and its numeric operations
addition, subtraction, multiplication and division. (16)
14. (a) (i) Describe functional overloading with example. (8)
(ii) Write short notes on connection and derived classes. (8)
Or
(b) Explain virtual function in C++. Describe any two applications in which virtual functions may use. For each
of these applications, specify the parent classes and derived classes. (16)
15. (a) Write a C++ program to convert Delta network (?) to star (Y) network. (16)
Or
(b) Partition a software development problem of your choice into classes, sub classes, objects and methods at
the highest level of design. (16)

You might also like