University of Sargodha ADP 31ª Semester Examination 2025 Subject: IT Paper: Obiect Oriented Programming (CMPC-201)
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
Subject: IT Time Allowed: 02:30 Hours University of Sargodha M.Sc. 4th Semester Examination 2025
Uploaded 7 months ago
Download ↓
University of Sargodha M.Sc. 2"d Semester (F-24) Examination 2025 Subject: I.T Paper: Object Oriented Programming (CMP-2123)
Uploaded 7 months ago
Download ↓
University of Sargodha AD/BS 2nd Semester (F-24) Examination 2025 Paper: Object Oriented Programming (CMPC-5202)
Uploaded 8 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 9 months ago
Download ↓
No preview
University Of Sargodha 2025 OOP Object Oriented Programming BSIT Subjective Part
Uploaded 12 months ago
Download ↓
No preview
BSIT - Object-Oriented-Programming-UOS-2025
Uploaded 12 months ago
Download ↓
Paper text
University of Sargodha
ADP 31ª Semester Examination 2025
Subject: IT
Paper: Obiect Oriented Programming (CMPC-201)
Time Allowed: 02:30 Hours
Note: Objective part is compulsory. Attempt any three questions from subjective part.
Maximum Marks: 40
Objective Part
(Compulsory)
Q.1. Write short answers of the following in 2-3 lines each on your answer sheet.
Does Java support Multiple Inheritance.
Differentiate between method overloading and method overriding.
ії.
iv.
Explain the difference between checked and unchecked exceptions.
What is Object Serialization?
What is the purpose of finally block?
Vi.
-Can a constructor be overloaded?
Can one try block have multiple catch blocks?
vin.
Differentiate between component and container.
(2*8)
Q.4.
Q.5.
Q.
Subjective Part
Define a class BankAccount with fields accountNumber, balance, and accountHolderName. Write
down three-argument constructor. Also, implement methods to deposit, withdraw, and display
account details.
(8)
Write a program to implement an abstract class Shape with two abstract methods area and
perimeter. Derive classes Circle (having data member radius) and Rectangle (having data member
length and width) implementing the area and perimeter) method. In both classes add appropriate
constructors as well.
Area of Circle = PI * (radius)
Perimeter of Circle = 2 * PI * radius
(8)
Area of Rectangle = (length*width) Perimeter of Rectangle = 2 (length + width)
Explain Exception Handling in Java with an example program handling ArithmeticException and
ArrayIndexOutOfBoundsException.
a) Explain Aggregation in Java with an example.
/b) What is the significance of the static keyword in Java?
(3)
Create a class Rational having fields num and denum. Include two argument constructor, get and
printO methods. The get should throw exception if entered denominator is ZeTo, Finally, write an
application that uses Rational class. Instantiate two objects and then call get and displayO method
for each object.
(8)
- LK-6562/29-05-25 -