Problem Solving and Object Oriented Programming - Dec 2014
Information Technology Engineering (Semester 3)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS (1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
Answer any one question from Q1 and Q2
1 (a) Write a solution to the problem of finding the largest number out of three numbers. Develop algorithm, flowchart, interactivity chart, input-output chart. Also list down three advantages of algorithm and flowchart.(6 marks) 1 (b) List down major types of modules and explain their functions with example.(6 marks) 2 (a) Give three numbers as an input, print their sum and product. Develop the solution to this problem using sequential logic structure.(6 marks) 2 (b) What is decision logic structure? How do you use a decision table? Explain with example.(6 marks)
Answer any one question from Q3 and Q4
3 (a) What is meant by an ordered array? Write an algorithm to remove duplicate elements from an ordered array.(6 marks) 3 (b) Write an algorithm for linear search and array order reversal.(6 marks) 4 (a) Write a program in C++ for creating array of student object (for 150 students). Create class student with data members as Roll Number, Name, Address, mobile number and member functions as get data and display data. Define member function outside class.(6 marks) 4 (b) Differentiate between Procedural Oriented Programming and Object-oriented Programming.(6 marks)
Answer any one question from Q5 and Q6
5 (a) What is static data member and static member function ? Write its properties.(7 marks) 5 (b) What are rules for operator overloading? List the operators which cannot be overloaded. List the operators which cannot be overloaded by using friend function.(6 marks) 6 (a) Write a program in C++ to overload unary '-' operator using friend function.(7 marks) 6 (b) Explain constructor and destructor in inheritance. Write a program to demonstrate how constructor and destructor are invoked in multilevel inheritance.(6 marks)
Answer any one question from Q7 and Q8
7 (a) What is exception handling mechanism in C++ ? Write a program in C++ to handle 'divide by zero' exception.(7 marks) 7 (b) Write a note on Sequence Container, Associative Container and Derived Container.(6 marks) 8 (a) Write a program in C++ for bubble sort using function template.(7 marks) 8 (b) Write a note on RTTI.(6 marks)