Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Code No: R05410808 R05 Set No.

2
IV B.Tech I Semester Examinations,December 2011
OOPS THROUGH JAVA
Common to Chemical Engineering, Electronics And Control Engineering,
Electronics And Instrumentation Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. What is event source? Give examples of event sources. How events are generated?
Are all events generated by user actions? Comment on it. [16]

2. (a) How do you pass actual parameters to a method? Can actual parameter have
the same name as its formal parameters?
(b) What is method overloading? Can you define two methods that have same
name but different parameter types? Can you define two methods in a class
that have identical method names and parameter profile with different return
value types or different modifier? [6+10]

3. (a) How multithreading is achieved using Runnable interface?


(b) Write an example program for multithreading using Runnable interface.[8+8]

4. 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. [16]

5. Write a program that will compute the following series:

(a) 1/1 + 1/2 + 1/3 + ...... + 1/n


2
(b) 1/1 + 1/2 + 1/2 + ....... + 1/2n . [8+8]

6. (a) Discuss briefly about the following: TCP, UDP, URL


(b) What is InetAddress? How to create an InetAddress? What is its use? [8+8]

7. (a) In what way JList differ from JComboBox?


(b) JList does not support scrolling. Why? How this can be remedied? Explain
with an example. [6+10]

8. Write a shape class and derive circle, square & rectangle classes. Write suitable
methods to calculate the area using interfaces. [16]

?????

1
Code No: R05410808 R05 Set No. 4
IV B.Tech I Semester Examinations,December 2011
OOPS THROUGH JAVA
Common to Chemical Engineering, Electronics And Control Engineering,
Electronics And Instrumentation Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) How multithreading is achieved using Runnable interface?


(b) Write an example program for multithreading using Runnable interface.[8+8]

2. Write a program that will compute the following series:

(a) 1/1 + 1/2 + 1/3 + ...... + 1/n


2
(b) 1/1 + 1/2 + 1/2 + ....... + 1/2n . [8+8]

3. (a) In what way JList differ from JComboBox?


(b) JList does not support scrolling. Why? How this can be remedied? Explain
with an example. [6+10]

4. (a) Discuss briefly about the following: TCP, UDP, URL


(b) What is InetAddress? How to create an InetAddress? What is its use? [8+8]

5. 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. [16]

6. What is event source? Give examples of event sources. How events are generated?
Are all events generated by user actions? Comment on it. [16]

7. (a) How do you pass actual parameters to a method? Can actual parameter have
the same name as its formal parameters?
(b) What is method overloading? Can you define two methods that have same
name but different parameter types? Can you define two methods in a class
that have identical method names and parameter profile with different return
value types or different modifier? [6+10]

8. Write a shape class and derive circle, square & rectangle classes. Write suitable
methods to calculate the area using interfaces. [16]

?????

2
Code No: R05410808 R05 Set No. 1
IV B.Tech I Semester Examinations,December 2011
OOPS THROUGH JAVA
Common to Chemical Engineering, Electronics And Control Engineering,
Electronics And Instrumentation Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. (a) How multithreading is achieved using Runnable interface?


(b) Write an example program for multithreading using Runnable interface.[8+8]

2. What is event source? Give examples of event sources. How events are generated?
Are all events generated by user actions? Comment on it. [16]

3. Write a program that will compute the following series:

(a) 1/1 + 1/2 + 1/3 + ...... + 1/n


2
(b) 1/1 + 1/2 + 1/2 + ....... + 1/2n . [8+8]

4. Write a shape class and derive circle, square & rectangle classes. Write suitable
methods to calculate the area using interfaces. [16]

5. 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. [16]

6. (a) How do you pass actual parameters to a method? Can actual parameter have
the same name as its formal parameters?
(b) What is method overloading? Can you define two methods that have same
name but different parameter types? Can you define two methods in a class
that have identical method names and parameter profile with different return
value types or different modifier? [6+10]

7. (a) In what way JList differ from JComboBox?


(b) JList does not support scrolling. Why? How this can be remedied? Explain
with an example. [6+10]

8. (a) Discuss briefly about the following: TCP, UDP, URL


(b) What is InetAddress? How to create an InetAddress? What is its use? [8+8]

?????

3
Code No: R05410808 R05 Set No. 3
IV B.Tech I Semester Examinations,December 2011
OOPS THROUGH JAVA
Common to Chemical Engineering, Electronics And Control Engineering,
Electronics And Instrumentation Engineering
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????

1. What is event source? Give examples of event sources. How events are generated?
Are all events generated by user actions? Comment on it. [16]

2. 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. [16]

3. (a) How multithreading is achieved using Runnable interface?


(b) Write an example program for multithreading using Runnable interface.[8+8]

4. (a) Discuss briefly about the following: TCP, UDP, URL


(b) What is InetAddress? How to create an InetAddress? What is its use? [8+8]

5. Write a program that will compute the following series:

(a) 1/1 + 1/2 + 1/3 + ...... + 1/n


2
(b) 1/1 + 1/2 + 1/2 + ....... + 1/2n . [8+8]

6. (a) In what way JList differ from JComboBox?


(b) JList does not support scrolling. Why? How this can be remedied? Explain
with an example. [6+10]

7. (a) How do you pass actual parameters to a method? Can actual parameter have
the same name as its formal parameters?
(b) What is method overloading? Can you define two methods that have same
name but different parameter types? Can you define two methods in a class
that have identical method names and parameter profile with different return
value types or different modifier? [6+10]

8. Write a shape class and derive circle, square & rectangle classes. Write suitable
methods to calculate the area using interfaces. [16]

?????

You might also like