Problem Solving and Object Oriented Programming - May 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) What are the two ways of sending data from one module to another module through the use of parameters? Explain with suitable example.(4 marks)
1 (b) Explain the concept of local variable and global variable with suitable example.(4 marks)
1 (c) n a multiplex the charges for a movie varies according to the age of the persons. Using the positive logic, develop a solution to print the ticket charges given the age of person:
|Over 55||Rs. 150|
|12 - 54||Rs. 200|
|13 - 20||Rs. 150|
|3 - 12||Rs. 100|
|Under 3||Free of cost|
i) The average of 3 numbers
ii) The sale price of an item given an original price and a discount percentage.(2 marks)
Answer any one question from Q3 and Q4
3 (a) Explain the algorithm for reversing the elements of an array.(6 marks)
3 (b) Explain the various features of Object Oriented Programming.(6 marks)
4 (a) Define a Class Bank Account having data members and member functions as:
1) Name of depositor
2) Account number
3) Type of account
4) Balance amount in the account.
1) To assign initial values
2) To deposit an amount
3) To withdraw an amount after checking the balance
4) To display name and balance.(6 marks) 4 (b) Write a short note on:
i) Table Lookup technique
ii) Pointer technique.(6 marks)
Answer any one question from Q5 and Q6
5 (a) What is inheritance? What are different types of inheritance?(6 marks) 5 (b) Explain constructor and destructor. What is need of virtual destructor?(7 marks) 6 (a) Write a C++ program to subtract 2 complex numbers using concept of overloading using friends function.(7 marks) 6 (b) Explain early binding and late binding.(6 marks)
Answer any one question from Q7 and Q8
7 (a) Explain Standard Template Library (STL).(6 marks) 7 (b) Write a C++ program to swap two numbers using concept of function template.(7 marks) 8 (a) Explain unformatted I/O, formatted I/O in detail.(6 marks) 8 (b) How to catch multiple exceptions ? Write a fragment of code to explain same concept.(7 marks)