SPPU Information Technology (Semester 3)
Problem Solving and Object Oriented Programming
May 2015
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


Answer any one question from Q1 and Q2
1 (a) What are the various types of modules ? Explain the term coupling and cohesion related to module.
6 M
1 (b) What is the difference between an expression and equation? Write an equation to calculate the following:
(i) The average of five numbers.
(ii) The sale price of an item given an original price and a percentage discount.
(iii) The amount when the principal, interest and period of time is given.
4 M
1 (c) Evaluate for A = 5, B = 3 and C = 2:
(i) F = A * C(A + C)
(ii) F = (C * (B + 3 * A) + 5 * A)/C
2 M

2 (a) Design an algorithm to calculate the salary of an employee using the following problem solving strategies:
(i) Sequential logic
(ii) Decision logic
(iii) Loop logic
(iv) Selection logic
To calculate the salary consider designation, no. of days worked, wages per day, basic salary, allowances and deductions. Calculate salary according to designation of employee.
8 M
2 (b) Define Algorithm. What are the various types of algorithm? Explain them with suitable example.
4 M

Answer any one question from Q3 and Q4
3 (a) An instructor has a class of 25 students. Each student is identified by a number from 1 to 25. All tests are stored in a 2-dimensional array, with each column containing the grades for each test. The instructor would like to enter the student number and the test number and have the grade for that test printed on the monitor. Develop a solution to output the needed information.
6 M
3 (b) Explain how the polymorphism is achieved in C++ with suitable examples.
6 M

4 (a) Define constructor and destructor. Explain various types of constructors with syntax.
6 M
4 (b) Explain the algorithm to count the number of times a particular word occurs in a text.
6 M

Answer any one question from Q5 and Q6
5 (a) Explain with a suitable example how code reusability is achieved in C++.
6 M
5 (b) What are the various rules for overloading the operators?
4 M
5 (c) Define Friend Class. Explain the concept of forward declaration of a class.
3 M

6 (a) Define inheritance. Explain various types of inheritance with suitable example.
10 M
6 (b) What is an operator function ? Describe the syntax of an operator function.
3 M

Answer any one question from Q7 and Q8
7 (a) What is generic programming ? How is it implemented in C++?
3 M
7 (b) Define exception. Explain various types of exception with example.
10 M

8 (a) Describe briefly the features of I/O system supported by C++.
4 M
8 (b) Explain how the exception is handled in C++.
4 M
8 (c) What is STL? Explain various components of STL.
5 M



More question papers from Problem Solving and Object Oriented Programming
SPONSORED ADVERTISEMENTS