Object Oriented Programming AD/BS 2 Semester/Term UOS — University of Sargodha 2026
Discussion
Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.
No questions yet — be the first to ask.
Need a paper or stuck on a question? Ask here — students reply and you get an email.
Ask about a paperPaper text
University of Sargodha
AD/BS 2ml Semester Examination 2026
Subject: CS/IT/SE
Paper: Object Oriented Programming (CMPC-5202)
Time Allowed: 2:30 Hours
Maximum Marks: 40
Note: Obiective Part is comoulsory. Attemptauy three questions from subjective part.
Objective Part (Compulsory)
Q.1.
Write short answers of the following in 2-3 fines each on your answer sheet.
(2*8)
What are the key differences between procedural programming and object-oriented
ii.
1.
iv.
programming?
Define the term const member function. How is it different from a non-const function?
Explain the term interface in the context of OOP.
Give a brief overview of multiple inheritance.
How are class templates useful in generic programming?
vi.
Define abstract class with an example.
vii. What is the use of the Standard Template Library (STL)?
viii.
Explain the role of the try-catch block in C++.
Subjective Part
(3*8)
Q.2. Write a complete C++ program to demonstrate the concept of inheritance and method
Q.3.
overriding.
Explain the history and evolution of object-oriented programming. What makes it superior to
procedural approaches?
O.4.
Describe the steps involved in identifying classes and their relationships during object-
oriented design.
Q.5.
Explain the difference between Composition and Inheritance. When should you use
composition over inheritance in object-oriented design? Support your answer with appropriate
examples and scenarios.
Q.6. Create a class Complex for complex numbers with: Private members for real and imaginary
parts. Constructors (default and parameterized). Overload the + and - operators to perform
arithmetic operations. A display function. Write a main function to test the functionality.
-LK-9288/12-11-2026-(F-25)-