LinkedIn Insight BSc.-Object Oriented Programming-Mumbai-November 2018 - Grad Plus

BSc.-Object Oriented Programming-Mumbai-November 2018


Subject: Object Oriented Programming

Semester: 2

(2½ Hours)
[Total Marks: 75]
N. B.: (1) All questions are compulsory.
(2) Make suitable assumptions wherever necessary and state the assumptions made.
(3) Answers to the same question must be written together.
(4) Numbers to the right indicate marks.
(5) Draw neat labeled diagrams wherever necessary.
(6) Use of Non-programmable calculators is allowed.

Q. 1) Attempt any three of the following: (15M)

a) Discuss procedure-oriented programming paradigm. Also discuss its characteristics.

b) What is object oriented programming paradigm? Discuss its characteristics.

c) Define any two of the following
(i) Classes (ii) Objects  (iii)Data abstraction

d) Discuss benefits and applications of oops.

e) Explain static and dynamic binding.

f) Write a short note on data abstraction and data encapsulation.


Q. 2) Attempt any three of the following: (15M)

a) What is a class? How a class can be defined? Discuss various ways of defining member functions of a class.

b) What are objects? How they can be declared? Also, discuss memory allocation for objects in object oriented programming.

c) How data members and member functions of a class can be accessed. Write a program to demonstrate the concept of accessing public members of a class.

d) What is a constructor? List various types of constructors. Explain copy constructor with programming example.

e) Declare a class rectangle with data members as length and breadth, and member functions as get data() to read data and display() to find and display area and perimeter of a rectangle. Also, write main method to implement the class.

f) What is a friend function? How it can be declared? What are its characteristics?


Q. 3) Attempt any three of the following: (15M)

a) Define function overloading and operator overloading. Write down the rules for overloading operators.

b) Write a C++ program to add two complex numbers by overloading binary + operator.

c) What do you understand from data conversion between objects and basic types? List various type conversions.

d) Write a C++ program to demonstrate conversion from user defined to basic data type.

e) What is this pointer? Write a C++ program to demonstrate use of this pointer.

f) What are virtual functions? What are the rules for writing virtual functions?


Q. 4) Attempt any three of the following: (15M)

a) What is inheritance? Discuss different forms of inheritance.

b) Discuss public, private and protected data members and member functions. When to declare which type of data members/member functions.

c) Write a C++ program to demonstrate use of hybrid inheritance.

d) What is an exception? Explain exception handling mechanism in detail.

e) What happens when raised exception is not caught by catch block? Explain with suitable example.

f) Write a C++ program to show use of multiple catch statements.


Q. 5) Attempt any three of the following: (15M)

a) Explain various methods to detect end of file.

b) Write a program to open two files country and capital simultaneously and print the name of the capital in front of the country.

c) Explain the use and purpose of following functions
(i) seekg() and seekp()
(ii) tellg() and tellp()

d) What are class templates? Explain their use. How they can be declared?

e) Define a class named vector. Illustrate the use of vector class template for performing
the scalar product of int type vectors as well as float type vectors.

f) What is a function template? Write a C++ program to demonstrate the use of function

Scroll to Top
error: Alert: Content selection is disabled!!