0 ratings0% found this document useful (0 votes) 323 views3 pagesJAVA PROGRAMMING0001 Ilovepdf Compressed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Reg. No.: Tepe
Question Paper Code : 71760
B.E/B.Tech. DEGREE EXAMINATION, APRIL/MAY 2015.
Fifth Semester
Information Technology
IT 2301/IT 51/10144 IT 501 — JAVA PROGRAMMING.
(Regulation 2008/2010)
-
‘Time : Three hours Maximum : 100 marks
Answer ALL questions
PART A— (10 x 2= 20 marks)
1. How is a constant defined in Java?
2. How super‘) is used with constructors?
3. What is a Java package and how is it used?
4, Differentiate static binding and dynamic binding.
“a 5. Define the term ‘Proxies’ in JAVA
6. What is an inner class? Give an example for it.
7. Whats an event delegation model?
8 Draw the inheritance hierarchy for the frame and component classes in AWT
and Swing. :
9, What are the advantages of Generie Programming?
10. When a thread is created and started, what is its initial state?
SEPART B— (5 x 16 = 80 marks)
11. (a) @ Explain with the help of a program how object oriented
programming. overcomes the shortcomings of procedure oriented
programming. @
(i) What is inheritance? How will you call parameterized constructor
and over rided method from parent class in sub class? ®
Or
(’) Create a Java Class Shape” with constructor to initialize the one
parameter “dimension”. Now create three sub classes of Shape with
following methods :
() “Circle” with methods to calculate the area and circumference of the
circle with dimension as radius.
Gi) “Square” with methods to calculate the area and length of diagonal
of the square with dimension as length of one side.
(ii) “Sphere” with methods to calculate the volume and surface area of
the sphere with dimension as radius of the sphere. Write
appropriate main method to create object of each class and test
every method. 6)
12. (a) @ Given two one dimensional arrays A and B which are sorted in
ascending order. Write a JAVA program to merge them into a single
sorted array, see that it contains every item from array A and B, in
ascending order. ®)
(i). With an example, describe in detail about how polymorphism plays
a useful role in JAVA. ®
Or
(®) Explain with an example how multiple inheritance is achieved in java.
(16)
13. (a) Develop a Library interface which has drawbook( ), returnbook( ) (with
fine), checkstatus( ) and reservebook( ) methods. All the methods are
tagged with public in the following ways
(Using draw book() ~ get the required book based on title
(ii) Using checkstatus( ) — user book returned date details
(ii) Using with fine) - Whether failed to return the book within a time
period charge — Rs. 5/day.
(iv) Using reserve book( ) ~ block or reserve particular book for their
account. (16)
Or
2 71760b)
4 @
-
©
15. (a)
£
)
@ Explain I/O Streams with suitable examples. Co)
Gi) With an example describe in detail about how to work with 2D
shapes in JAVA. ®
Create a simple menu application that enables a user to select one of the
following items : (16)
Radio 1
Radio 2
Radio 3
Radio 4
Radio 5
Red Dragon Radio
(@) from the menu bar of the application
Gi) from a pop-up menu
(ii) from a toolbar
Add tooltips to each menu item that indicates some information
about the Radio station such as type of music and its broadcast
frequency.
Or
(@ Discuss about the Java error handling mechanism? What is the
difference between ‘unchecked exceptions’ and ‘checked exceptions’?
What is the implication of catching all the exceptions with the type
“Exception”? ®
(i) Explain in detail about Model view controller pattern in JAVA. (8)
Write a complex program to illustrate about thread priorities. Imagine
that the first thread has just begun to run, even before it has a chance to
do anything. Now the higher priority thread that wants to run as well.
Now the higher priority thread has to do its work before the first thread
starts. (16)
Or
(@ Explain life cycle of a thread with help of a diagram. How do the
wait and Notify Al/notify methods enable cooperation between
threads? ®
i) Explain in detail about generic method with a suitable example. (8)
3 71760
You might also like
WWW - Manaresults.co - In: (Common To CE, EEE, ME, ECE, EIE, MSNT)
WWW - Manaresults.co - In: (Common To CE, EEE, ME, ECE, EIE, MSNT)
2 pages