Automatically extracted historical question data. Academic accuracy and examination rules require verification.
Section marks require review. Marks charts are withheld.
Part B — 11
Consider a class network of Fig. 11. The ciass master derives information from -both
account and admin classes which in turn derive information from the class person. Define
all the four classes and write a program to create, update and display the information
contained in master objects. [16]
Person
.| Name
code
accounts
admin
pay ்
experience
master
Name னி
Code
Experience
pay
Fig. - 11
௩ ் 8, : t
yee
Other Or UnclassifiedSource quality review required
Part B — 12a
a) Write a C++ program to perform complex numbers addition, subtraction and result
display operations, using constructors and destructors; member and friend functions
and an operator overloading function appropriately. [16]
Or |
b. i) Illustrate the concept of virtual functions with an example. [6]
fi) {llustrate the different kinds of class type conversions with example. [10]
Other Or UnclassifiedSource quality review required
Part B — 13a
a) Write a program to store the polynomial expression terms in random order, display the
terms in descending order of powers and count the number of terms in the expression
using a doubly linked list. - [16]
Other Or UnclassifiedSource quality review required
Part B — 13b
b) Write a program to convert an infix expression to a postfix expression and evaluate that
postfix expression. | [16]
Other Or UnclassifiedSource quality review required
Part B — 14
9) i) Construct a binary search tree by inserting 3,1,4,9,6,5,2,8,7 into an initially empty
tree. Show the results of splaying the nodes 1,6 and 7 one after the other of the
constructed tree. [10]
ii) Explain binary heap that has a max-value at the root. [6]
் Or
b) i) Show the results of inserting 4,1,2,5,6,7,3 into an initially empty AVL tree. [8]
ii) What is collision in terms of hashing? Explain any three collision resolution methods
with example. [8]
Other Or UnclassifiedSource quality review required
Part B — 15a
a)i) Explain greedy algorithm by solving the problem of single source shortest path ofa
digraph using Dijkstra’s algorithm. [10]
ii) Explain shell sort algorithm with an example. [6]
[OR]
இ) Explain divide and conquer method of solving problems using suitable example. [10]
i) Illustrate with an example the insertion sort algorithm to sort a list of elements in
ascending order. [6] -
Other Or UnclassifiedSource quality review required