(Paper) BCA : CS72 C++ and Object Oriented Programming Question Papers (Set - 2)

Paper : BCA : CS72 C++ and Object Oriented Programming Question Papers (Set - 2)
Note: Question number 1 is compulsory. Answer any three questions from the rest.

(a) Explain the concepts of encapsulation and information hiding in an object oriented paradigm with the help of an example in C++.

(b) Explain ‘dynamic binding’, with the help of an example. Give its advantages and disadvantage.

(c) Differentiate between function and operator overloading. Also give one example of each.

(d) What are public and private inheritance? Why do we need different access specifiers?

(e) Explain the utility of the friend function, using an appropriate example.

(f) Write a String class in C++ which should include the member function to calculate the length of the string.

(a) If a base class and derived class each include a member function with the same name, which member function will be called by an object of a derived class, and why?

(b) Write a program to read and display information about employees and managers. Employees is a class that contains employee_no, name and address. Manager class contains all the information of the employee class and the list of employees working under this manager.

(a) Define a class template. What are its advantages?

(b) Write a temple function for exchanging (swapping) the values between two variables. Use this function in main ( ) for int, double and char type of variables.

(a) What is an interaction diagram? Explain the steps involved in drawing each such a diagram, with the help of example.

(b) Explain the concept of virtual functions. Give three examples of the use of such functions.

Q.5. Explain the following with the help of an example each:
(i) Static data member
(ii) Object Oriented Programming
(iii) File streams in C++
(iv) Exception handling