April / May 2012
Data Structures and Object Oriented Programming in C++
Anna University
1 question papers available. Select an examination session to view its question paper.
Data Structures and Object Oriented Programming in C++
Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.
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
0 eligible source papersa) 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]
0 eligible source papersa) 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]
0 eligible source papersb) Write a program to convert an infix expression to a postfix expression and evaluate that postfix expression. | [16]
0 eligible source papers9) 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]
0 eligible source papersa)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] -
0 eligible source papersHistorical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.