M.C.A DEGREE EXAMINATION JUNE/JULY 2009
2ND SEMESTER
CA5152 OBJECT ORIENTED PROGRAMMING
(REGULATION 2007)
PART A – [10 X 2 = 20 marks]
1.What do you mean by data abstraction?
2. Give the advantages of object oriented programming.
3. What are friend functions?
4. How does an Inline function differ from a preprocessor macro?
5. What are copy constructors?
6. What is pure virtual function?
7. Write the function template for swap.
8. What are lists in C++?
9. What is purpose of ‘this’ pointer?
10. List the functions used with I/O stream.
PART B – [5 X 16 = 80 marks]
11.Explain the features of object oriented programming with examples.
Or
Compare the features of different programming paradigms.
12. Explain the various file stream classes needed for file manipulation.
Or
Explain the concept of passing an object by reference and return an object by reference with suitable example.
13.(a) Explain constructor with default arguments. (8)
(b) Describe the use of copy constructors. (8)
Or
(a) Explain overloading of unary operators (post ++, pre ++) with example. (8)
(b) Explain multiple inheritance with example. (8)
14.(a) write a program to create a string class and include member functions to add two string objects and to display string object. (10)
(b) write a note on exceptions. (6)
Or
(a) What is a nested class? Explain with an example. (8)
(b) what is meant by Map? Explain with an example. (8)
15. Explain the role and different types of classes with an example.
Or
(a) Write a program to calculate the sub totals of products sales in 5 different zones. Each zone has 5 sales persons. Finally print total sales amounts along with subtotals of each zone. And also print the total sale of each sales person. Use static members. (10)
(b) Write a C ++ program to print the calendar of months Jan-May of a given year.
No comments:
Post a Comment