Punjab University 2010-2nd Year B.A Comter Science B :- Object Oriented Programming(Using C++), , - Question Paper
Tuesday, 07 May 2013 07:00Web
B.A. 2nd Year
COMPUTER SCIENCE - PAPER : B
[Objective Oriented Programming (Using C++)]
Time Allowed:Three Hours Maximum Marks:67
Note: Attempt 5 ques. in all by selecting any 2 ques. every from
Section A and part B. part C is compulsory.
SECTION-A
1. (a) How an object-oriented paradigm differs from traditional programming
language ?[Marks 7]
(b) Describe the concepts of encapsulation and data-hiding in detail.[Marks 6]
2. (a) Describe the structure of a C++ program by quoting suitable example.[Marks 7]
(b) How private and public members are created in a class? How their
access in specified ? Justify.[Marks 6]
3. (a) Compare and contrast different ways for passing arguments to a
functions in C++.[Marks 7]
(b) How the nesting of member functions is done ? What is the benefit
of the identical ? discuss.[Marks 6]
4. (a) How objects are created and accessed in C++ programs ? discuss.[Marks 7]
(b) Write a program in C++ demonstrating the use of arrays.[Marks 6]
SECTION-B
5. (a) Write a program in C++ to obtain out the largest of 3 number using
the concept of a class.[Marks 7]
(b) How a class is derived and used from a base class ? discuss.[Marks 6]
6. (a) What is the use of overloading a function ? discuss with suitable
example.[Marks 7]
(b) Describe different visibility modes supported by C++.[Marks 6]
7. (a) What is multi-level inheritance ? define through a C++ program.[Marks 7]
(b) How classes are nested in C++ programs ? discuss.[Marks 6]
8. (a) Write an algorithm for sorting a list on n-elements.[Marks 7]
(b) What is a linked list ? How it differs from an array ? discuss.[Marks 6]
9. (i) Define Polymorphism.
(ii) What is I/O stream ?
(iii) Define Inheritance.
(iv) What is a data member ?
(v) Define scope resolution operator.
(vi) How pointer to an object is defiend in C++ program ?
(vii) What is Constructor ?
(viii) How a protected member is made inheritable ?
(ix) Differentiate ranging from Queue and Stack.
(x) What is tree ? provide it usage.[Marks 10x1.5=15]
Earning: Approval pending. |