Vous êtes sur la page 1sur 5

ANNA UNIVERSITY: CHENNAI 600 025

B.E/B/Tech DEGREE EXAMINATIONS OCTOBER 2014


Regulation 2013
Third Semester
B. Tech Information Technology
IT6311 PROGRAMMING AND DATA STRUCTURES II

Time : 3 Hours Maximum Marks : 100

1. Write a program in C++ to calculate area of a circle, rectangle and square using runtime
polymorphism. (100)

2. Write a program in C++ to perform stack operations by overloading operators ++ and --for
Push and Pop respectively. (100)

3. Write a C++ program to implement producer-consumer problem using Queue. Overload


operators ++ and --for Enqueue and Dequeue operations repectively. (100)

4. Write a C++ program to evaluate the following infix expression using stack. (100)
4 + 8 * (6 / 3) - 5
5. Develop a C++program for implementing a Binary search tree. Perform the following
operations: (100)
i. Create a BST tree
ii. Delete a node which has 2 child, 1 child and no child
iii. Traverse by inorder

6. Write a C++ program to implement sorting of n data (integer and character) using function
templates. (100)

7. Write a C++ program to create a generic vector class using class templates and overload the
addition operator to perform vector addition. (100)

8. Design stack and queue classes with necessary exception handling. Throw exceptions during
overflow and underflow conditions. (100)

9. Write a C++ program to copy the set of employee records from one file to another where
each record is written in a single line using file streams. (100)

10. Write a C++ program to write a set student records in a file and try fetching a record by
specifying the record number using file streams. (100)
11. Define a class Student. Inherit this class in MCAStudent and NonMCAStudent. Also inherit
Student into Local and non_Local students. Multiple inherit LocalMCAStudent from Local
and MCAStudent. Define five LocalMCAStudents. (100)

12. Create a phone directory using map of string objects and perform remove_copy and
replace_copy operations. (100)

13. Develop a C++program for implementing a Binary search tree for the following list. (100)
30, 20, 25, 22, 40, 42, 35, 37

i. Perform delete 30 by FindMin().


ii. Traverse by inorder, preorder and postorder.

14. Write a C++ program to perform matrix operations between M1 and M2 by overloading
operators in the following statement and overload << to display M3. (100)
M3 = (-M1) + M2

15. Create a Class student. Perform the operations by defining get_marks() as inline member
function and display() member functions defining outside the class. Use average() as friend
function to the class student. (100)
i. Use constructor for getting inputs.
ii. Use static member to count the number of objects created.
iii. Use destructor for memory deallocation.
16. Develop a bank database by creating a class Customer containing customer name, id,
address, accountbalance as private data members and public member functions for deposit
and Withdrawal. Create a class Deposit, a friend of Customer class, containing amount,
years, rate, returnvalue, as private data members and count-FD as static member, public
member functions for account-summary() which displays the customer name, id, address,
accbalance, count-FD, amount and Initiate-FD() for calculating maturity value. Use
parameterized constructor for getting inputs to start a FixedDeposit. (100)

17. Implement the following class hierarchy. (100)


Shape

Sphere Cylinder Square

The base class contains pure virtual function to calculate the area of the shape. Implement
function in each of the derived classes and test the program with proper inputs from main
function.

18. Develop a template of linked-list class and its methods insert and delete. (100)

19. Write a C++ program to find the shortest path in the given graph (100)
20. Write a C++ program to find a minimum spanning tree for a graph using Prims algorithm.
(100)

Mark allotment Pattern

Aim & Execution &


Program Viva Total
Algorithm Results

30 30 30 10 100

Vous aimerez peut-être aussi