Object Oriented Programming Msc IT 2 Semester/Term University Of Sargodha (UOS) 2016
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 2 months ago
Download ↓
Object Oriented Programming Msc IT 2 Semester/Term University Of Sargodha (UOS) 2025
Uploaded 8 months ago
Download ↓
University of Sargodha AD/BS 2nd Semester (F-24) Examination 2025 Paper: Object Oriented Programming (CMPC-5202)
Uploaded 9 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 12 months ago
Download ↓
Paper text
University of Sargodha
M.Se, 2id Term Exam 2016.
Paper: Object Oriented Programming (CMP: 2123)
Maximum Maria: 60
ustadni.com
Sublect: L.I
Allowed: 2:30 Hour
Note:
ustadni.com
(2*12)
Objective Part
(Compulsory)
0.1.
i.
ii.
Hi.
iv.
V.
vi.
vili.
ix.
X.
xi.
xii.
Attempt all questions each question carry equal marks?
What do you mean by object oriented programming?
How we create a reference variable and object of a class?
What do you mean by encapsulation in object oriented programming?
How we concatenate two strings?
What is the purpose of Scanner class?
What is the purpose of constructor of a class?
Differentiate abstract classes and concrete classes?
Differentiate between Upcasting and Downcasting
What is overriding of a method? Also give an example.
What is IS-A relationship in classes?
Can we extend an Interface in a class?
What is dynamic polymorphism?
Subjective Part
(4*9)
Q.2
Create a Distance class with instance variable feet and inches. Write suitable parameterized
constructor, getter and setter methods and a method to add two distance objects in such a way
that if resultant inches exceed 12, feet should be incremented by 1 and inches decremented by
12 by using the statementdist3 - distl.add(dist2); where disti, dist2 and dist3 are objects of
Distance class.
0.3.
Create a Shape interface that uses Area as method. Two classes Rectangle and Circle, use
Shapeintarface, implement the concept of Upcasting by calculating the areas of implementing
clabies:
e-ustente a Person class that uses name pocktance variable. Create another class Student
extending Person class that uses student Id as variable of Student class. Writa suitable
parameterized constructor only gad implement concept of overriding to display Pinformation
within the object.
Describe the concept of polymorphism by highlighting its different types by using suitable
examples.
Q.6.
How exception handling is used to avoid abnormal termination. Give three examples of un-
0.7.
checked exceptions by giving examples.
What are different types of variables supported by java? What are the various ways to initialize
each of them?
visit website: ustadni.com