You are on page 1of 2

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

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


SUBJECT- COMPUTER SC
PAPER- COSC-3 (PR)
FULL MARKS-25 TIME :2HRS

Instructions to the students: Answer the following questions 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.---

Group –A
Answer any 01 question (15x1=15)
Group – A: must be constituted with Algorithm, Program, Results, and Discussion.
Marks Distribution:
Algorithm = 3, Program = 6 , Results = 4, and Discussion = 2

1. Write a program to get reversal of a string & also check if the string is Palindrome or not for a user inputted
string.

2. Write a program to sort the following five cities alphabetically by writing own line of code to sort them.
Cities={"Madras","Delhi","Ahmedabad","Kolkata","Mumbai"}

3. Write a program to check whether a user inputted number is prime and also derive all the Prime numbers
within user specified range.

4. Write a program to calculate area of rectangle by creating object of Rectangle class and also use
parameterized constructor to pass the data.

5. Write a program to illustrate overloading of method having different parameter list & definition.

6. Write a program to illustrate overriding of method in child class.

7. Write a java code to illustrate dynamic method dispatch mechanism.

8. Write a program to implement the concept of multilevel inheritance.

9. Write a program to implement the concept of multiple inheritance using interface.

10. Write a program to create a user level thread by implementing Runnable interface.
11. Write a program to depict random output changes of a thread created by extending Thread class.

12. Program to solve the problem of inconsistent output using synchronization.

13. Write a program to handle Arithmetic Exception cause by math errors such as division by zero.

14. Write a program to handle Array Index out of Bound Exception caused by bad array indexes.

15. Write a program for client and server each to implement chat application where bi-directional
communication between client and server can be done simultaneously using IP.

Group –B
Answer any 05 question (5x2=10)
1. Why thread should be "syncronized" ?

2. What are the access specifier in java?

3. Define Abstract class & method.

4. Why finalizer() method is used ?

5. What are the primitive data types in java ?

6. Why suspend() and wait() are used and how to resume the thread again?

7. Difference between Process and Thread and how they are created.

8. Difference between Error and Exception.

You might also like