OBJECT ORIENTED PROGRAMMING Paper-IT -30 l- C Time allowed: 3 hours Maximum Marks: 100 -----------------.--=-: ..... _____________ .. _ u
Note: Attempt any five questions.
1. (a) Differentiate between the following by giving
examples of each:
(i) OOP and procedure oriented Prog.
(ii) Classes and objects. 7 x 2 = 14
(b) Discuss Grady Booch approach. 6
2. (a) Discuss the complete structure of ac/C++. Program.
1 0 (b) Discuss scope of variables giving example of each. 10
3. (a) Write a program which define a in-line function to
multiplv two integers and d0uhle<:. II ) (b) Wril<: shon note on dynamic creation and destruction of objects. 10
4. Writ.e a program which calls a function power ( ) which uses
the concept of overloading III find the square and cubeof integer and 003r arguments. Explain overloading functions. 2 0 543-500--P-2--()-R (04) P.T.O. (2)
5. Write short notes on the followings:
(i) Pure virtual ~unctions 7 (ii) Overloading inherited memher function 7 (iii) Dynamic binding. 6
6. Declare the singly-linked-list class and write its member
fl!nctinn<.: Tn in,ert and remove the element in a list. (!\1ake necessary assumptions). 20
7. Write a program to overload operator «, » for string
class. 20
8. (a) Write a program to implement generic stack using
macro. 1 0 (b) Explain class templates giving examples. 10