Oops QP Ass2
Oops QP Ass2
1. Define abstraction and encapsulation. (b) Explain various file handling mechanisms in detail.
2. When will the destructors be called?Is it implicit or explicit?
14. (a) Explain with example program exception handling in
3. List the operators that cannot be overloaded.
java.
4. What are the pure virtual functions?Where are they used?
5. Define Exception. Give example. (or)
6. How is the keyword ‘super’ used in java?
(b) What is a thread? How do you create threads?
7. What is byte code?
8. What are packages? 15. (a) (i) What are packages?How we they created and used?
9. Define interface. State its use.
(ii) Explain the Virtual Machine concept with reference
10. What is thread?
to Java.
PART – B (5 X 16 = 80)
(or)
11. (a) Explain in detail about class, objects, methods and
(b) Write a java class called ‘student’ with name, marks of 3
messages.
subjects and total marks. Write another class named ‘calculate’
(or) that gets the marks of the student and calculates the total Marks
and displays the result(pass or fail).
(b) (i) Illustrate the concept of function overloading to find
the maximum of two numbers.
(ii) Write a program containing a possible exception. Use a
try block and throw it and a catch block to handle it properly.
HOD Principal