Ec6301 Oopds Nov - Dec2016
Ec6301 Oopds Nov - Dec2016
Ec6301 Oopds Nov - Dec2016
__
-I __.___.__.___.___.__.___.___l._____..__l__.____,
Third Semester
(Regulations 2013)
PART B- (5 x 13 = 65 marks)
11. (a) Explain in detail about the features of object oriented programming. (13)
Or
(b) (i) Write a program for swapping two numbers using friend function.
(6)
(ii) Write a program to find the area of a rectangle and triangle using
function Overloading. · (7)
12. (a) Explain the concept of composition with example. (13)
Or
(b) Describe the types of inheritance in C++ with an example. (13)
13. (a) Implement insertion, deletion and search operations in single linked list.
(13)
Or
(b) Develop an algorithm to implement Queue ADT. Give relevant e'xamples
and diagrammatic representation. (13)
14. (a) Discuss the graph traversals with suitable algorithms and examples. (13)
Or
(b) Explain the algorithm for union and find operations ih disjoint sets. (13)
15. (a) Explain the algorithm of Quick sort by sorting the following set of
numbers as an example: 42 47 52 57 62 37 32 27 22. (13)
Or
(b) Write the algorithm to perform binary search on an array and
demonstrate with an example. (13)
Or
(b) Define an abstract class called Employee. Derive two classes called
Hourly Employee and Salaried Employee. Hourly Employee has number
of hours (integer), and wage per hour (float).
Sal~ried Employee has sala ry of type float. Calculate salary ( ) in an
abstract function in class employee which inherited by derived classes.
Write a main program to create objects of all classes and calculate salary
of each object. (15)
2 80332