Model
Object Oriented Programming
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Long Questions:
Attempt any two questions: (2 × 10=20)
- What is object oriented programming? Explain objects, class, encapsulation, data hiding, inheritance, and polymorphism.
- Explain operator overloading. Write a program that overloads insertion and extraction operators.
- What is inheritance? Explain the ambiguities associated with multiple inheritance with suitable example programs.
Short Questions
Attempt any eight questions: (8 × 5=40)
- Explain the purpose of a namespace with suitable example.
- What is the principle reason for passing arguments by reference? Explain with suitable code.
- Why constructor is needed? Explain different types of constructors with example.
- Write a program that illustrates the conversions between objects of different classes having conversion function in source object.
- Explain the difference between private and public inheritance with suitable diagram.
- Why friend function is required? Discuss with example.
- How late binding is different from early binding. Write a program that explains late binding using virtual function.
- Why do we need exceptions? Explain “exceptions with arguments” with suitable program.
- What are the advantages of using the stream classes for I/O? Write a program that writes object to a file.