[Link].
Code No: CT3511 SRGEC-R20
II [Link] I Semester Supplementary Examinations, January 2025
OBJECT ORIENTED PROGRAMMING THROUGH JAVA
(Computer Science and Engineering, Artificial Intelligence and Data Science, Artificial
Intelligence and Machine Learning & Information Technology)
Time: 3 Hours Max. Marks: 70
Note: Answer one question from each unit.
All questions carry equal marks.
5 × 14 = 70M
UNIT-I
1. Classify and explain the types of Wrapper Classes. (14M)
(OR)
2. a) Develop a Java program to print default values of all primitive-data types in java. (6M)
b) Develop a Java program to perform addition of two matrices. (8M)
UNIT-II
3. What is a Constructor? Explain the different types of constructors with suitable example
programs. (14M)
(OR)
4. a) Explain method overriding with the help of suitable examples. (8M)
b) Analyze the outcome of the following java code segment and justify your answer. (6M)
final class A
{
int a;
}
class B extends A
{
void display( )
{
[Link](“a=”+a);
}
public static void main(String arg[])
{
B b1=new B();
[Link]();
}
}
UNIT-III
5. a) Does importing a package make sub packages class files available to the application. (7M)
b) In a package if a source file has multiple classes then can we make all the classes public.
Comment on this statement with necessary examples. (7M)
(OR)
Page 1 of 2
6. a) List and explain any 4 lambda expressions in Java. (8M)
b) Write a Java program to implement nested Interface. (6M)
UNIT-IV
7. a) Develop a java program to handle user defined exception. (7M)
b) Develop a java program to achieve synchronization between two threads using
synchronized statement. (7M)
(OR)
8. a) Is Synchronization of Threads needs to be done at every time. Justify your answer with
appropriate example. (7M)
b) Can a java program handle multiple exceptions. Justify your answer with appropriate
example. (7M)
UNIT-V
9. a) Design an applet to create checkboxes for different courses belonging to a university such
that the courses selected would be displayed in a TextField. (7M)
b) Differentiate between FlowLayout and Grid Layout with example code. (7M)
(OR)
10. a) Develop an applet program by using Border Layout and add the following components
into it, in the top region add a button with label “OK” , in the right region add a label with
text “SRGEC” on it, in the bottom region add a TextField, in the left region add a choice
control with list of courses available in the college and in the center add a Check box with
a label “OOPTJ”. (8M)
b) Develop an applet program to display the state of an applet. (6M)
*****
Page 2 of 2