QP Code: RD21BTECH081 Reg.
AR 21
No
GIET UNIVERSITY, GUNUPUR – 765022
B. Tech (Third Semester - Regular) Examinations, December – 2022
21BCSPC23002 / 21BCMPC23002 / 21BCDPC23002
Object Oriented Programming Through JAVA
[CSE,CSE(AIML), CSE(DS)]
Time: 3 hrs Maximum: 70 Marks
Answer ALL questions
(The figures in the right hand margin indicate marks)
PART – A (2 x 5 = 10 Marks)
Q.1. Answer ALL questions CO # Blooms
Level
a. Why java is called platform independent language? CO1 K1
b. Differentiate between a static and non-static data member in java? CO2 K3
c. What is the output of the following code? CO3 K1
public class test{
public static void main(String[] arr){
Integer num1 = 400;
Integer num2 = 400;
if(num1 == num2){
[Link](0);
}
else{
[Link](1);
}
}
}
d. Explain constructor chaining with an example. CO2 K2
e. Write a short note on Daemon Thread. CO3 K1
PART – B (15 x 4 = 60 Marks)
Answer ALL questions Marks CO # Blooms
Level
2. a. Explain all the characteristics of Java. Write a program to calculate the factorial 8 CO1 K2
of a number.
b. Write a java program to read a number and test whether it is Armstrong or not. 7 CO1 K1
(OR)
c. Differentiate between for loop and for each loop. Write a program to illustrate 8 CO1 K2
an array of objects.
d. Write a java program to read two matrices of m x n and p x q order, multiply them 7 CO1 K2
and display the resultant matrix. ( Read values of m,n,p,q by using Scanner class)
3.a. Explain the following methods used in the StringBuffer class with examples. 8 CO2 K2
1. append() 2. insert() 3. replace() 4. delete()
b. Why wrapper classes are required? Explain autoboxing and unboxing with 7 CO2 K1
suitable examples of each.
(OR)
Page 1 of 2
c. Explain the following with an example: 8 CO2 K2
i) this ii) super iii) final
d. What is the difference between Error and exception? Write a java program to 7 CO2 K1
illustrate the usage of multiple catch handlers.
4.a. Explain the following with an example of each: 8 CO3 K2
i. local inner class
ii. anonymous inner class
b. Explain the usage of Serialization in Java with an example. 7 CO3 K2
(OR)
c. What do you mean by deadlock? Explain with an example. 10 CO3 K1
d. What is user defined Exception in Java? WAP to accept student age and check 5 CO3 K1
whether he is eligible to vote or not? Show an appropriate message when the age
is not eligible.
5.a. Write a Java program to implement Mouse Motion Adapter? 8 CO4 K2
b. How applets are different from applications? Explain the life cycle of an applet. 7 CO4 K2
(OR)
c. Write a Java program to count total number of words and characters entered in 8 CO4 K2
the textarea.
d. Write a program to draw a smiley using the applet. 7 CO4 K2
--- End of Paper ---
Page 2 of 2