Printed Page: 1 of 2
Subject Code: KCA202
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
MCA
(SEM II) THEORY EXAMINATION 2021-22
OBJECT ORIENTED PROGRAMMING
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If you require any missing data, then choose suitably.
SECTION A
1. Attempt all questions in brief. 2x10 = 20
Qno Questions CO
(a) Explain difference between JDK and JRE in Java. 1
(b) Object is an instance of class, justify your answer. 1
(c) What is the role of class path in Java Package? 2
(d) Write 3 use of Encapsulation in Object Oriented Programming. 2
(e) Explain difference between throws and throw keyword in Java. 3
(f) Draw hierarchical diagram of Java.io package. 3
(g) Explain types of ways to create thread in Java. 4
(h) Explain generic programming concepts in Java. 4
(i) Draw hierarchical diagram of Java Swing Classes. 5
(j) What is the difference between JPanel and JFrame in Java Swing? 5
SECTION B
2. Attempt any three of the following: 10x3 = 30
Qno Questions CO
(a) What are uses of this keyword? Explain with proper example. 1
(b) Explain the role of constructor and also explain how sub 2 class
constructor implicitly call super class constructor in Java.
(c) Write Java program to copy one image to another. 3
(d) Write generic Java program that display sum if pass numeric data and 4
merge text if pass string data.
(e) Explain difference between AWT and Swing with proper example. 5
SECTION C
3. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Explain the compilation and execution process of Java program with 1
proper diagram.
(b) Explain 10 features of Java Programming Language. 1
4. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) What do you understand by Polymorphism? Explain type 2 of
polymorphism with proper example.
(b) What do you mean by abstract class? How abstract class is different 2
from Interface.
5. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Write Java program that accepts a temperature in Celsius. It should
throw an Exception “Temperature Below Normal” when the
temperature is less than 20C, throw an Exception “Normal 3
Temperature” when the temperature above 20C and below 40C and
throw an Exception “Temperature is High” when the it is greater than
40C.
Printed Page: 2 of 2
Subject Code: KCA202
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
MCA
(SEM II) THEORY EXAMINATION 2021-22
OBJECT ORIENTED PROGRAMMING
(b) Explain the use of Buffered Reader and Buffered Writer classes with
suitable example 3
6. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Describe how inter- thread communication is takes place in java with 4
thread life cycle diagram?
(b) Discuss generic bounded class with the help of an suitable example. 4
7. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Write Java Swing program that change background color whenever 5
user click on button and displays the message “Welcome to Java
Swing”.
(b) Determine event? How is event handling done in Java'? Explain with 5
an example.