Candidates Are Required To Give Their Answers in Their Own Words As Far As Practicable
Candidates Are Required To Give Their Answers in Their Own Words As Far As Practicable
Tribhuvan University
Institute of Science and Technology
2066
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
Section B
Attempt any eight questions: (8x5=40)
IOST, TU
Prepared By ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2067
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming Language) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. Discuss the feature of the Object-Oriented Programming. Differentiate between Object Oriented
Programming and Procedural Oriented Programming.
2. What is constructor? Explain their types? Discuss user defined parameterized constructor with suitable
example.
3. Define a clock class (with necessary constructors and member functions) in Object Oriented Programming
(abstract necessary attributes and their types). (Write a complete code in C++ programming language).
Derive a wall_clock class from clock class adding necessary attributes.
Create two objects of wall_clock class with all initial state to 0 or NULL.
Section B
Attempt any eight questions: (8x5=40)
4. How can you classify objects? Why dynamic objects are needed?
5. What is operator overloading? Explain their types with suitable examples.
6. Why type conversion is necessary in OOP? Explain with example, the type conversion routine.
7. What is Inheritance? Explain their types with their suitable examples.
8. What is friend function? Why it is used in OOP? Explain with an example.
9. What is container class? Differentiate container class from inheritance.
10. Explain the role of virtual function in Object Oriented Programming.
11. Explain about “this” pointer with suitable example.
12. Write a program to find the square of given integer using inline function.
13. Write a program to convert feet into meter.
IOST, TU
Prepared By ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2068
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. What are the main feature of the Object-Oriented Programming. Explain with suitable practical examples.
2. Explain the role of constructor and destructor in Object-Oriented Programming. Discuss user defined
parameterized constructor with suitable example.
3. Define a Shape class (with necessary constructors and member functions) in Object Oriented Programming
(abstract necessary attributes and their types). (Write a complete code in C++ programming language).
Derive Triangle and Rectangle classes from Shape class adding necessary attributes.
Use these classes in a main function and display the area of triangle and rectangle.
Section B
Attempt any eight questions: (8x5=40)
IOST, TU
Prepared By ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2069
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. Differentiate between structural programming approach and object oriented programming approach.
Explain inheritance and polymorphism with example.
2. How is a member function of a class defined? Define friend function. What are the merits and demerits of
using friend function? Explain.
3. Define constructor. List some of the special properties of the constructor functions.
Section B
Attempt any eight questions: (8x5=40)
9. Explain with example, how can you create space for array of objects using pointers?
12. What are the main advantages of using exception handling mechanism in a program?
IOST, TU
Prepared By ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2070
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. Write any four features of object-oriented programming. Differentiate between operator overloading and
function overloading.
2. Why do we need the preprocessor directive #include <iostream>? Describe the major parts of a C++
program.
3. What do you mean by overloading of a function? When do we use this concept? Explain with example.
Section B
Attempt any eight questions: (8x5=40)
IOST, TU
Prepared By ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2071
Bachelor Level/ Second Year/ Third Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc. 202) Pass Marks: 24
(Object Oriented Programming) Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. Why do we need object oriented programming? How can we use inheritance to reuse already written and
tested code in programs? Discuss with suitable example. (3+3+4)
2. Discuss features of class and object. Design a class to represent a bank account with data members name,
account-number, account-type, and balance and functions to assign initial values, to deposit an amount, to
withdraw an amount after checking balance, and to display the name and balance. (4+6)
3. What is operator overloading? What are the benefits of overloading? How is operator overloading different
from function overloading. Write a program that shows an example of function overloading. (2+2+2+4)
Section B
Attempt any eight questions: (8x5=40)
IOST, TU
©ASCOL CSIT 2070 Batch
Tribhuvan University
Institute of Science and Technology
2072
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Section A
Attempt any two questions: (2x10=20)
1. Explain the object oriented programming with its advantages. What are the features of object oriented
languages? Explain.
2. Write a program to overload the unary minus operator using friend function.
3. Explain the role of inheritance in object oriented programming. What is public, private and protected
dentation? Explain.
Section B
Attempt any eight questions: (8x5=40)
4. Explain the syntax and rules of multiple inheritance in C++ with example.
5. Explain do/while structure with example.
6. Explain the Inline function with example.
7. What is multiple inheritance? Explain with example.
8. Explain the static class members with example.
9. Differentiate between macro and function.
10. Explain the use of break and continue statements in switch case statements in C++.
11. Explain the different storage classes in C++.
12. Explain the multilevel inheritance. How is it different from multiple inheritance?
13. Explain the exceptional handling with example.
IOST, TU