Bachelors Level/First Year/Second Semester/Science bit/second semester/object oriented programming/syllabus wise questions

Bachelors In Information Technology

Institute of Science and Technology, TU

Object Oriented Programming (BIT153)

Year Asked: 2081, syllabus wise question

Basics of C++ programming
1.
Explain advantages and disadvantages of inline function. [5]
2.
Illustrate the use of set w and set precision with example. [5]
Class and Objects
1.
How does structure differ with class? What are the uses of friend function and friend class? Explain the types of constructors. [1+3+6]
2.
How do you return object in function? Describe with an example. [5]
3.
How do you convert basic data type to user defined data type? Explain. [5]
File and Streams
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]
Function Templates and Exception Handling
1.
Why do we need to handle exception? Illustrate with an example. [5]
Inheritance
1.
List any two types of inheritance with example. Describe the order of execution of constructors and destructors in derived class. [5+5]
Introduction to Object Oriented Programming
1.
Describe the features of object oriented programming. [5]
Operator Overloading
1.
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]
2.
What are the purposes of operator overloading? Address the problem in multiple inheritance. [5]
Virtual Function, Polymorphism, and other C++ Features
1.
Distinguish between concrete class and abstract class. Describe the roles of polymorphism. [5]