CSIT 2nd Semester
Object Oriented Programming Board Question Paper 2081 Old Course


CSC 166-2081 ✡
Tribhuvan University
Institute of Science and Technology
2081
Bachelor Level/First Year/Second Semester/Science
Computer Science Information Technology (CSC 166)
(Object Oriented Programming)
(Old 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.

Define class and objects. Show the use of default, parameterized and copy constructor with your own example.

2.

Differentiate between exception and error. What is the use of virtual function? Create a class named Shape with member function draw(), then derived the class Rectangle, Circle and Square from Shape class, and override the draw() functions in all the derived classes with appropriate messages.

3.

How do you convert basic data type to another basic data type? Create a class named Point with two data members x and y. Overload the binary addition operator to add the two objects of Point class.

Section B

Attempt any Eight questions

[8x5=40]
4.

How do you open, close, read and write in file?

5.

Use the concept of function template to find the difference of any two integers.

6.

Show the use of static data members with an example.

7.

Can we use structure instead of class? What might be the limitations of object oriented programming approach? Explain.

8.

Illustrate with an example to show the concept of multi-level inheritance.

9.

Define namespace and its uses. What are the uses of new and delete?

10.

Write a program to create a text file and write the string given by user.

11.

Discuss the three types of access specifiers in inheritance.

12.

What is data conversion? When do we use inline function? Explain.