CSIT 2nd Semester
Object Oriented Programming Board Question Paper 2079


CSC 166-2079 ✡
Tribhuvan University
Institute of Science and Technology
2079
Bachelor Level/First Year/Second Semester/Science
Computer Science Information Technology (CSC 166)
(Object Oriented Programming)
(New Course)
Full Marks:60 Pass Marks:24 Time:3 hours

Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks

Section A
Long Answer Questions
Attempt any Two question.
[2x10=20]
1.

What is aggregation? Write a program for implementing following.
Create a class author with attributes name and qualification.
Also create a class publication with pname. Form these classes o crive a class book having attribute title and price.
Each of three classes should have a get data () method to get their data from user. The classes should have put data () method to display the data.
Create instances of the class book in main.

2.

What is operator overloading? Why it is necessary to overload and operator? Write a program for overloading comparison operators.

3.

What is the use of constructor and destructor? Write a program for illustrating default constructor, parameterized constructor and copy constructor.

Section B

Attempt any Eight questions

[8x5=40]
4.

Describe the characteristics of object oriented programming languages.

5.

Define class and object with suitable examples. How members of class can be accessed?

6.

What is inline function? Why it is used? Write a program to illustrate inline function.

7.

What are possible data conversion types? Write a program to show basis to user defined conversion.

8.

What are the various class access specifies? How public inheritance differs from private inheritance?

9.

Write a program to implement function template with multiple arguments.

10.

Write a program to illustrate the use of seekg() and tellg().

11.

How dynamic memory allocation is done using new and delete? Write program for illustrating use of new and delete.

12.

Write Short note On :
a) Friend Function
b) Early binding and late binding