Object Oriented Programming With Java Aut,Cse,Civ,Che,Ele,Etc,Mec,Mme,Pe 3rd 21 22
Object Oriented Programming With Java Aut,Cse,Civ,Che,Ele,Etc,Mec,Mme,Pe 3rd 21 22
Registration No :
Part-II
Q2 Only Focused-Short Answer Type Questions- (Answer Any Eight out of (6×8)
109 109 109 109 109 109 109 109
Twelve)
a) Explain the features of an object oriented programming language.
b) What is JVM and write its significance in executing a program?
c) Explain the working of command line arguments in Java with an example.
d) Explain Dynamic Method Dispatching with example.
e) What is wrapper class? Explain the use of various wrapper classes with example.
f) Write a program in Java to replace a word by another word in a given text. For
109 109 example replace
109 cat by dog109in the text “catwood
109 asks asks109
walcat to change
109 109
cartage”
g) Write a program in Java to create a user define exception so that when user enters
mark more than full mark he will get a warning.
h) Explain the limitation of multiple inheritance and how it is overcome by using
interface.
i) Write a program in Java swing to create two text fields to read the input and a
command button to add these numbers. The result should be displaced in a third
109 109 text field. 109 109 109 109 109 109
j) Create a user defined package to find the average of n numbers and import to your
main program to find the standard deviation of n numbers.
k) Explain the following
109 109 Member inner 109class, Static inner
109 class, Local inner
109 class, Anonymous
109 inner class109 109
l) How the keywords throw and throws are used in exception handing? Explain with
example.
Part-III
Only Long Answer Type Questions (Answer Any Two out of Four)
Q3 Why Java is called an object oriented programming Language? Explain briefly (16)
various data types and operators used in Java.
109 109 109 109 109 109 109 109
Q4 Differentiate between method overloading and method overriding with suitable (16)
examples. Write a program to find c(n, r)=n!/r!(n-r)! by inheriting from a class that
computes the factorial of a number.
Q5 Explain briefly the life cycle of thread in Java. Write all methods and their role in (16)
Thread execution.