Pokhara University
Bachelor of Engineering in Computer Engineering
Semester 2 · PU Spring 2023
Course Title: Object Oriented Programming in C++
Full Marks: 100Pass Marks: 45Time: 3hrs.
Candidates are required to give their answers in their own words as far as practicable.
- 1.7
- a) Explain non-linear behaviour of complexity. How is OOP different from POP? Explain with examples.
- b) What are the different ways of defining member functions? Explain g with suitable examples.
- 2.15
- a) What are the advantages of class over structure? Briefly explain the components of a class with program structure in C++.
- b) Define constructor with its characteristics. WAP to find area of circle and rectangle using the concept of constructor overloading.
- 3.7
- a) Inheritance enhances reusability. Elaborate this using an example of = multilevel inheritance.
- b) What is abstract class and pure virtual function? How can you g implement run time polymorphism? Explain with example program.
- 4.15
- a) What is polymorphism? Explain compile time and runtime polymorphism with suitable examples.
- b) Explain the concept of user defined to user defined data conversion.
- 5.15
- a) Why is generic programming beneficial? Explain template function with simple program.
- b) What is exception handling? How do you handle exception in C++? Explain with a simple program.
- 6.11
- a) Describe components of CRC card and its importance in design.
- b) What is sequence diagram? Explain with an example. 9.
- a) Memory allocation and recovery
- b) Principle of substitutability
- c) Concept of composition 1
— The End —