JNTU Previous Question Papers-B Tech-Oops Through Java-November 2008

JNTU II B.Tech I Semester Supplementary Examinations, November 2008

OOPS THROUGH JAVA

( Common to Mechanical Engineering, Mechatronics, Metallurgy &

Material Technology, Production Engineering and Automobile Engineering)

SET-4

 

 

1. (a) What Kind things can become objects in OOP?

(b) List few areas of application of OOP technology.

(c) write a program to convert the given temperature in Fahrenheit to Celsius using the following conversion formula C = (F – 32)/1.8 And display the values in a tabular form.

 

2. (a) what is the difference between the vector Object and array Object?

(b) What is the difference between a String Object and array of char values?

(c) Write a program for multiplication of matrices (Test the validity of matrix sizes before performing multiplication).

 

3. Create a 3-level inheritance hierarchy. Each class in the hierarchy should have a finalize( ) method, and it should properly call the base-class version of finalize( ).

Demonstrate that your hierarchy works properly.

 

4. Create an interface with at least one method, in its own package. Create a class in

a separate package. Add a protected inner class that implements the interface. In a third package, inherit from your class and, inside a method, return an object of the protected inner class, upcasting to the interface during the return.

 

5. Explain the following exceptions with the help of examples:

(a) ArithmeticException

(b) NullPointerException

(c) NumberFormatException.

 

6. (a) What is the functionality supported by java related to drawing ellipses and circles.

 

(b) What is the functionality supported by java related to drawing arcs.

 

7. Explain the steps involved in creating JCheckBox, JRadioButton, JButton, JLabel.

 

8. (a) Explain the 3 ways of creating a Date object.

(b) Write a program to display the current date and time. The program should also determine whether the current year is a leap year or not.

 

1 thought on “JNTU Previous Question Papers-B Tech-Oops Through Java-November 2008”

Leave a Comment