Home /UOS — University of Sargodha /Object Oriented Programming

Object Oriented Programming AD/BS 2 Semester/Term UOS — University of Sargodha 2026

Object Oriented Programming AD/BS 2 Semester/Term UOS — University of Sargodha 2026 — page 1

Discussion

Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.

Your email is only used to send you replies and occasional Ustadni updates. It is never shown publicly.

Log in to post under your name

No questions yet — be the first to ask.

Need Paper? See all →

Need a paper or stuck on a question? Ask here — students reply and you get an email.

Ask about a paper
  • Ayesha Mustafa· 7 days ago

    BS ZOOLOGY first semester Animal diversity ZOOL 101 - university of Punjab 2025

    0 replies Reply →
  • Abubakar· 7 days ago

    Literary criticism

    1 reply Reply →
  • Guest· 7 days ago

    this paper consists of 60 marks but now we have 35 marks paper.

    1 reply Reply →
  • saira khalid· 1 month ago

    air past paper nhi h

    1 reply Reply →
Ad

Paper 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)-