0% found this document useful (0 votes)
12 views2 pages

Object Oriented Programming - 2078

Uploaded by

asutosasutos6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Object Oriented Programming - 2078

Uploaded by

asutosasutos6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BIT153-2078 ✡

Tribhuvan University
Institute of Science and Technology
2078

Bachelor Level/First Year/Second Semester/Science​ Full Marks: 60
Bachelors in Information Technology (BIT 151)​ Pass Marks: 24
(Object Oriented Programming)​ 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 questions.​ [2x10=20]
1.​ Create a class Employee with private data members Eid, Ename, and Salary. Include
public member functions read and display value of data members. Derive a class names
typist from above class. The class should contain a private data members. Finally create
two objects of typist class and read and display their values.​ [10]
2.​ What is object-oriented programming? How does it differ from procedure-oriented
programming? Explain features of object oriented programming.​ [10]
3.​ Create a class called time that has separate int member data for hours, minutes, and
seconds. One constructor should initialize this data to 0, and another should initialize it to
fixed values. Another member function should display it, in 11:59:59 format. The final
member function should add two objects of type time passed as arguments. A main()
program should create two initialized time objects (should they be const) and one that
isn't initialized. Then it should add the two initialized values together, leaving the result in
the third time variable. Finally, it should display the value of this third variable Make
appropriate member functions const.​ [10]

Section B
Short Answer Questions
Attempt any EIGHT questions.​ [8x5=40]
4.​ Explain Memory Management Operators of C++ with example.​ [5]
5.​ Explain Call by Value and Call by Reference with appropriate example.​ [5]

BIT INFO NEPAL - Object Oriented Programming - BIT153-2078


IOST, TU
BIT153-2078 ✡

6.​ Describe types of constructors with an example.​ [5]


7.​ Explain use of objects as function arguments with example.​ [5]
8.​ Lost out various type conversion techniques? Explain basic to user-defined type
conversion with example.​ [5]
9.​ How-late binding differs from early binding? How can you achieve dynamic
polymorphism? Explain with example.​ [5]
10.​Explain pure virtual functions with example.​ [5]
11.​What is exception handling? Explain how to handle an exception with appropriate
example.​ [5]
12.​Write a program that writes the contents of file 1 into file 2.​ [5]

BIT INFO NEPAL - Object Oriented Programming - BIT153-2078


IOST, TU

You might also like