Dsa& Oop 2080
Dsa& Oop 2080
Group A
Objective question attempt all. 1x9=9
1. Which data structure is mainly used for implementing the recursive algorithm?
a) Queue
b) Stack
c) Linked list
d) Array
2. Which of the following statements is true about AVL Trees?
a) Difference between height left and right node cannot more than 1
b) The height of AVL tree always remain of the order O(logn)
c) AVL tree are self-balancing Binary search tree.
d) All the above.
3. Which feature of OOP indicates code reusability?
a) Abstraction
b) Polymorphism
c) Encapsulation
d) Inheritance
4. What is a class in C++?
a) A data type defined by the user
b) A blueprint for creating objects
c) A collection of functions
d) A container for variable
5. What is encapsulation in C++?
a) The process of combining data and functions into a single unit called class
b) The ability of an object to take many forms
c) The process of inheriting properties from another class
d) A method of data manipulation
Group B
Attempt all question 5x5=25
1. Define AVL tree? Create an AVL tree using following data 21,26,30,9,4,14,28,18,15,10.
2. Define class & object? Write program to enter currency in dollar and convert into Nepal’s
currency using class and object.
3. Define encapsulation & data abstraction? Write a program to enter distance in kilometer
and convert into meter using constructor.
4. “Inheritance supports code reusability “explain? list types of inheritance
multilevel inheritance with example.
5. Define polymorphism? Difference between static binding and dynamic binding.
or
6. Define function overloading? Explain binary operator overloading with example.
Group C
Attempt all question (8x2=16)
1. Define stack? Explain operation on stack. Write application of stack
2. Define object oriented programming? Explain features of object oriented programming. Write
difference between procedural programming and object oriented programming.
.................................Best of Luck...........................................