Credit:Eli TamangEli Tamang

Tribhuwan University

Institute of Science and Technology

2081

Bachelor Level / First Year / Second Semester / Science

Bachelors in Information Technology (BIT153)

(Object Oriented Programming)

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 Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Define stream. How do you read and write binary files? Write a program to read an integer from the user and if the integer is less than 100 then write it in file named "SMALL.TXT" otherwise write in file named "LARGE.TXT". [2+3+5]
2.
How does structure differ with class? What are the uses of friend function and friend class? Explain the types of constructors. [1+3+6]
3.
List any two types of inheritance with example. Describe the order of execution of constructors and destructors in derived class. [5+5]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Describe the features of object oriented programming. [5]
5.
Distinguish between concrete class and abstract class. Describe the roles of polymorphism. [5]
6.
Why do we need to handle exception? Illustrate with an example. [5]
7.
How do you return object in function? Describe with an example. [5]
8.
Write a program to create a class named STUDENT with data member age, then overload the unary operator (++) to increment the age of any object of above class. [5]
9.
Explain advantages and disadvantages of inline function. [5]
10.
How do you convert basic data type to user defined data type? Explain. [5]
11.
Illustrate the use of set w and set precision with example. [5]
12.
What are the purposes of operator overloading? Address the problem in multiple inheritance. [5]