0% found this document useful (0 votes)
60 views

Object Oriented Programming in C++

The document outlines an Object Oriented Programming exam for a Bachelor's degree course in C++, containing 8 questions testing knowledge of OOP concepts like classes, objects, inheritance, polymorphism, templates, and exception handling. Students are asked to write programs demonstrating their understanding of topics like constructors, operator overloading, information hiding, and the differences between compile-time and runtime polymorphism. They must also define classes to represent real-world entities and relationships.

Uploaded by

Karan Pant
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Object Oriented Programming in C++

The document outlines an Object Oriented Programming exam for a Bachelor's degree course in C++, containing 8 questions testing knowledge of OOP concepts like classes, objects, inheritance, polymorphism, templates, and exception handling. Students are asked to write programs demonstrating their understanding of topics like constructors, operator overloading, information hiding, and the differences between compile-time and runtime polymorphism. They must also define classes to represent real-world entities and relationships.

Uploaded by

Karan Pant
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

POKHARA UNIVERSITY Level: Bachelor Semester Fall Programme: BE Course: Object Oriented Programming in C++ Year : 2009 Full

l Marks : 100 Time : 3hrs.

Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks. Attempt all the questions. 1. a. What influence is an object-oriented approach said to have on the software system design? What is your own opinion? Justify through an example. b. 2. a. Explain the following term with suitable example: Agents, Responsibility, Messages, and Methods. What is information hiding? What are access modes available in C++ to implement different levels of visibility? Explain through example. b. 3. a. b. What is constructor? Explain copy constructor with suitable example. Write a program to generate Fibonacci series using operator overloading of ++ operator. Which type of overloading is it? State principle of substitutability. Explain sub classing for specialization, generalization. List out the disadvantages of 4. a.
b.

8 9

Inheritance. What are the merits and demerits of friend function? Define polymorphism. Explain the importance of polymorphism with a suitable example. The following figure shows minimum information required for each class. Write a program to realize the above program with necessary member functions to create the database and retrieve individual information. Every class should contain at least one constructor and should be inherited to other classes as well.
1

College Name Location Student Name Roll_no Books Teacher Name Code

Book_name Writer_name Code

5. a.

Define two classes named polar and rectangle to represent points in polar and rectangle systems. Use conversion routines to convert from one system to another system using template. b. What is pure virtual function?what is the difference between compile time and runtime polymorphism? Which is best and why? a. What do you mean by Generic programming? Write a function 6. template to calculate the sum and average of numbers. b. What is exception? Explain the mechanism of exception handling in C++? Write short notes on (Any Two): 7. a. Inline function b. Interface and implementation c. IS A rule and HAS A rule

8 7 8 7 52

You might also like