Final OOP
Final OOP
Final OOP
Instructions:
1) Neat Diagrams must been drawn whenever necessary.
2) Figures to the right indicate full marks.
3) Section A and Section B carries equal weightage.
4) Q1 and Q5 are compulsory questions.
Section A
Q 1. Solve the following question:- [6]
a) Explain the advantage of OOP launguage?
b) Explain data abstraction and information hiding in C++?
c) What are abstact classes? Explain.
Q 2. a) Why C++ is consider as Object Oriented Launguage? Explains Principles of OOP? [5]
b) Define comment. Why is it important to write comments in programs? [5]
OR
c) Describe the need of header files in Object-Oriented Programming? Explain its Syntax and
Structure in C++. [5]
d) Compare C and C++. [5]
Q 4.a) Define a class Animal with their basic features as class members. Create two derived classes
from Animal named herbivores and Carnivores (type) with their own features too. Accept name of
animal with type and display all the related information. [5]
b) Explain concept of Operator Overlaoding? How Unary Operators and Binary Operators are
overloaded. [5]
OR
c) Create a class staff having fields: Staff_id , name, salary. Write a menu driven program for:
Section B
Q 5. Solve the following questions:- [6]
a) Explain Friend Function?
b) Explain Overloading Function Templates?
c) Explain concept of Early Binding vs. Late Binding?
Q 6. a) Explain Virtual Functiom and Need for Virtual function in C++? What is This Pointer? [5]
b) Write a C++ program to demonstrate a pure virtual function which is invoked from the object of
derived class through the pointer of the base class. Base class contains getdata() and display().
Display the information of employee using this. [5]
OR
c) Write a C++ program to maintain the records of person with details (Name and Age) and find the
eldest among them. The program must use this pointer to return the result. [5]
d) Explain Static function? Explain dynamic binding?
OR
c) Write a C++ program to sort an array in ascending order using function template. [5]
d) Explain Input and output operation on Files handling? [5]
________________________________________________________________________________________