Você está na página 1de 7

J

N
T
U
W
O
R
L
D
|''|''|||''|''||||'|



IV B.Tech II Semester Supplementary Examinations, July 2013
OBJECT ORIENTED PROGRAMMING
(Electrical & Electronics Engineering)
Time : 3 hours Max. Marks :80
Answer any Five Questions
All Questions carry equal marks
*****
1. a) What do you understand by the term polymorphism. Differentiate Run Time
Polymorphism with Compile Time Polymorphism. [8]
b) Write a program to accept three integers from the user and print the largest among
them? [8]

2. a) What is a constructor. List out various properties of constructor. Give an example of
constructor. [8]
b) Differentiate Method overloading & Method overriding with suitable examples. [8]

3. What is Inheritance? Explain various forms of inheritances that are supported by Java
with suitable example each. [16]

4. a) What are packages. Enumerate the steps needed for Creating and Accessing a Package
with suitable examples. [8]
b) Compare and contrast Abstract Classes with Interfaces [4]
c) Explain the importance of CLASSPATH with example [4]

5. a) What is an exception? What are different exceptions in Java? Explain how you can
handle exception in JAVA with the help of an example using try-catch-finally block.
[8]
b) What is Runnable Interface? Explain with an example how it can be used to create
multiple threads. [8]

6. a) What is event handling? Discuss different types of event handling classes and event
handling interfaces. [8]
b) Write a program to create a window and set its title with JNTUK using AWT and
explain your program with necessary comments. [8]






Code No: K0226
Set No. 1
R07
1 of 2
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|







7. a) Write a program to create a calculator using swings with the four basic arithmetic
operations : +, , *, /. [8]
b) Discuss advantages and disadvantages of Java applets. Develop an applet that receives
two numerical values from the user and then displays the product of these numbers on
the screen. [8]

8. a) Explain with an example the concept of Adapter Classes. [8]
b) Explain various string handling mechanisms in Java. [8]



























2 of 2
Code No: K0226
Set No. 1
R07
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|



IV B.Tech II Semester Supplementary Examinations, July 2013
OBJECT ORIENTED PROGRAMMING
(Electrical & Electronics Engineering)
Time : 3 hours Max. Marks :80
Answer any Five Questions
All Questions carry equal marks
*****
1. a) What is JVM? Explain role of JVM in converting the java program into machine code.
[8]
b) Write a program to find whether a number is a palindrome or not. [8]

2. a) Explain various parameter passing mechanisms in Java with suitable examples. [8]
b) Can we overload operators in Java. Support your answer with a suitable example [8]

3. a) What is the importance of Final keyword with respect to inheritance [4]
b) Explain the usage of super keyword in java. [4]
c) Explain the concept of inner class with example [8]

4. What is an interface? Explain the following concepts with suitable examples. [16]
i. Defining an interface
ii. Implementing interface
iii. Applying interfaces
iv. Extending interfaces

5. a) Draw the exception hierarchy in java and explain with examples throwing and catching
exceptions and the common exceptions. [8]
b) What is synchronization? Write a program to demonstrate synchronization. [8]

6. a) Give a detailed note on Delegation Event Model. [8]
b) List out various components available with AWT. Explain any four components of
your choice. [8]

7. a) Explain the life cycle of an Applet. List various attributes of Applet tag used in HTML.
Explain the purpose of these attributes. [8]
b) Explain in detail about event AWT event hierarchy. [8]

Code No: K0226
Set No. 2
R07
1 of 2
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|






8. a) What do you understand by the term port. Explain it with an example. [8]
b) What is an URL? Briefly describe the following terms [8]
i. creating a URL
ii. parsing a URL
iii. Connecting to a URL





























2 of 2
Code No: K0226
Set No. 2
R07
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|



IV B.Tech II Semester Supplementary Examinations, July 2013
OBJECT ORIENTED PROGRAMMING
(Electrical & Electronics Engineering)
Time : 3 hours Max. Marks :80
Answer any Five Questions
All Questions carry equal marks
*****
1. a) Describe the structure of Java Program. [6]
b) Write a Java program to find the multiplication of two matrices. [10]

2. a) "Constructors can be overloaded". Support this statement with the help of an example.
[8]
b) Explain the importance of the following in java
i. final keyword
ii. this keyword [8]

3. What is Inheritance? Explain various forms of inheritances that are supported by Java
with suitable example each. [16]

4. a) Write a java program to search for a number in the given array using binary search. [8]
b) List out the differences between classes and interfaces. [8]

5. a) List out the uses of exception handling in JAVA? Write a program using Java that
handles an exception Entry of negative age of a person. [8]
b) Describe complete life cycle of a thread. Write a Java program that shows the use
of priority in threads. [8]

6. a) Write a detailed description on handling mouse and keyboard events. [8]
b) Explain Grid Layout Manager with suitable example. [8]

7. a) What do you understand by the term "User Interface"? List out any three UI
components of swings with their classes and interfaces. [8]
b) Explain the concept of Layout Managers in AWT with suitable code snippets
wherever necessary. [8]

8. a) Explain in detail about TCP/IP sockets. [8]
b) Explain the concept of passing parameters to applets. [8]



Code No: K0226
Set No. 3
R07
1 of 1
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|



IV B.Tech II Semester Supplementary Examinations, July 2013
OBJECT ORIENTED PROGRAMMING
(Electrical & Electronics Engineering)
Time : 3 hours Max. Marks :80
Answer any Five Questions
All Questions carry equal marks
*****
1. a) Explain the principles of OOP. [8]
b) Write a Java program to check whether the given alphabet is vowel or consonant
using switch case. [8]

2. a) What is the role of garbage collector? [5]
b) Explain the importance of Static keyword with respect to data and methods in Java [5]
c) What do you understand by the term Constructor? Discuss various constructor types
that are available in Java with one example each. [6]

3. a) "Interfaces are used to support the concept of multiple inheritance in Java". Support
this statement with suitable example. [8]
b) Discuss various member access rules in inheritance with examples wherever necessary
[8]

4. Give a detailed explanation of packages in Java. [16]

5. a) What is a thread? Explain various thread states and properties. [8]
b) Enumerate the differences between process and threads. [8]

6. a) Write a program to illustrate Card Layout Manager. [8]
b) Write a detailed note on
i. Event Classes
ii. Event Listeners [8]

7. a) Explain about applet lifecycle. How applets are prepared and executed? [8]
b) Write an AWT program to draw lines, rectangles and ovals. [8]



Code No: K0226
Set No.4
R07
1 of 2
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net
J
N
T
U
W
O
R
L
D
|''|''|||''|''||||'|






8. a) Explain in detail about the following packages [8]
i. java.util
ii. java.net
b) Explain various methods in URL class with their usage. [8]
1 of 2
Code No: K0226
Set No.4
R07
www.jntuworld.com || www.android.jntuworld.com || www.jwjobs.net || www.android.jwjobs.net
www.jntuworld.com || www.jwjobs.net