You are on page 1of 1

MC(A)/UG/S-II/21

END SEMESTER EXAMINATION OF SEMESTER – II (UG), 2021


SUBJECT- COMPUTER SC
PAPER- COSC-3 (Th)
FULL MARKS-40 TIME :2hrs

Instructions to the students: Answer two questions of 20 marks, one from each group in
A4 size paper in own hand-writing within – 2pages of A4-size paper (two single-side of A4-
size paper).
Each page of the answer sheet must contain:
Name of the Examination:
Student ID-No.----, class Roll No.-----------,Subject:......, Paper no.--------, Date of Exam:-----
--, Signature of the student.---

Answer two questions: one question from each group: 20x2=40

GROUP-A
(Answer any one : 1 x 20=20 )

1. Explain Java Environment. What are the tool contain in JDK? State similarities and dissimilarities
between Interfaces and Classes. Explain dynamic dispatch method with example. Define
Constructor and its types in Java, briefly explain each with proper example.
2+2+4+6+6

2. What is package in Java? How to access a package in Java? Write down the uses of final and super
keyword with respect to inheritance. Write an algorithm to create two threads, one thread will
print odd numbers and second thread will print even numbers between 1 to 20 numbers. Explain
Method Overriding with suitable example. 2+2+4+6+6

GROUP-B
(Answer any one : 1 x 20=20 )

3. What is the benefit of using thread instead of process? Differentiate between multitasking and
multithreading? Explain the terms with respect to exception handling. i) try ii) catch iii) throw iv)
finally. Describe different data types in Java. Write an algorithm to find out whether the given
number is palindrome or not. 2+2+4+6+6

4. What are the labeled Break and Continue statements? Design state transition diagram to explain
Life cycle of a thread. What is socket? Write an algorithm for client and server each to implement
chat application where bi-directional communication between client and server can be done
simultaneously using IP. 4+4+2+10

You might also like