Subject: Computer Science Time Allowed: 2:30 Hours University of Sargodha BS 2*d Term Examination 2015 Paper: Object Oriented Programming (CMP:2124) Maximum Marks: 60
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.
More Object Oriented Programming papers
See all
Object Oriented Programming AD/ADP/BS 2 Semester/Term University Of Sargodha (UOS) 2025
Uploaded 1 month ago · by Jaweria Gull
Download ↓
Object Oriented Programming AD/ADA/BS 2 Semester/Term University Of Sargodha (UOS) 2025
Uploaded 3 months ago
Download ↓
Object Oriented Programming Msc IT 2 Semester/Term University Of Sargodha (UOS) 2025
Uploaded 9 months ago
Download ↓
University of Sargodha AD/BS 2nd Semester (F-24) Examination 2025 Paper: Object Oriented Programming (CMPC-5202)
Uploaded 10 months ago
Download ↓
University of Sargodha AD/BS 2"d Semester (F-24) Examination 2025 Subject: CSAT/SE Paper: Object Oriented Programming (CMPC-5202)
Uploaded 10 months ago
Download ↓
Object Oriented Programming ADP 3 Semester/Term University Of Sargodha (UOS) 2025
Uploaded 1 year ago
Download ↓
Paper text
Subject: Computer Science
Time Allowed: 2:30 Hours
University of Sargodha
BS 2*d Term Examination 2015
Paper: Object Oriented Programming (CMP:2124)
Maximum Marks: 60
Note: Objective part is compulsory. Attempt any four questions from subjective part.
ustadni.co
Q.No.1:
Objective Part (Compulsory)
Attempt all parts and each require answer 2 - 3 lines
i:
What is Object-oriented programming?
ii: Explain Encapsulation concept in Object-oriented programming.
iii:
What is an abstract class?
iv:
Write the syntax of class declaration.
V: Which Member functions do not needed to be called by object and why?
V1:
What is the purpose of Destructor?
vil.
Different between method overriding and method overloading?
viii:
Define Inheritance?
ix:
What are Friend functions? Write the syntax of declaring a friend function.
x.
What is dynamic binding or late binding?
xi.
What is the purpose of try and catch blocks?
xii:
What is an object?
Q. No. 2
Subjective Part
(4*9)
Write a class car that contains attributes of car's name (type string), top speed (type
float) and model name (type string). A Constructor with no arguments initializes the
data members and two member functions to input and display these attributes.
Q. No. 3
Define Shape class and two subclasses of it, Rectangle and Oval. Use draw function to
demonstrate polymorphic behavior by using these classes.
ustad What is operator overloading? Overload ipsertion and extraction operator for a time
Q. No. 5
Imagine a tollbooth
usadni.co
class called Tollbooth that has
attributes
total number_of_cars(int) and total amount(double). Write down a two parameter
constructor and an Input member function in this class. Read two objects and store into
a text file "tollbooth.txt".
Q. No. 6
Q. No. 7
Describe the function tempiate and class template. Discuss with the help of an example.
Explain following with example
i. Polymorphism
ii. Dynamic Memory Management
visit website: ustadni.com