WAP to show rethrowing concept in oop by using suitable
WAP to show multiple throw statement execution by using suitable example.
WAP to show exception using try throw and catch block.
WAP to show the working of abstract class by considering suitable example
Define a class ABC. Derive two classes BBC and KBC from ABC. All the classes contains same member function name as display(). The base class pointer always holds the derived class objects.
a) Write a program such that base class pointer or reference will always access/call the base version of the members available in derived class, do not have any access to the derived class members.
b) Write a program such that base class pointer or reference will always access/call the derived version of the members available in derived class, do not have any access to the base class members.
Write down the concepts used for bit a) and b) separately.
(Pure Virtual Function) Write the above program by modifying by making display() as pure virtual function.
Q1:Define a class ABC. Derive two classes BBC and KBC from ABC. All the classes contains same member function name as display(). The base class pointer always holds the derived class objects.
a) Write a program such that base class pointer or reference will always access/call the base version of the members available in derived class, do not have any access to the derived class members.
b) Write a program such that base class pointer or reference will always access/call the derived version of the members available in derived class, do not have any access to the base class members.
Write down the concepts used for bit a) and b) separately.
WAP Write the following menu driven program for the binary search tree
----------------------------------------
Binary Search Tree Menu
----------------------------------------
1. Create
2. In-Order Traversal
3. Pre-Order Traversal
4. Post-Order traversal
5. Search
6. Find Smallest Element
7. Find Largest Element
8. Deletion of Tree
9. Quit
Write a menu driven program to create binary tree using linked list for
computing following information.
a) To count number of leaf nodes
b) To count number of non-leaf nodes
c) To find total number of nodes
d) To compute height of the binary tree
e) To find sum of all nodes
f) To find the minimum element
g) To find the maximum element
riorityQueue class which is implemented in the collection framework provides us a way to process the objects based on the priority. It is known that a queue follows First-In-First-Out algorithm, but sometimes the elements of the queue are needed to be processed according to the priority, that’s when the PriorityQueue comes into play. Let’s see how to create a queue object using this class.
WAP to implement level-order traversal using single Queue data structure.