You are on page 1of 5

^dͲϭ

Code No: X0322


II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

OBJECT ORIENTED PROGRAMMING


(Mechanical Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

1. a)“Members of a community interact with one another by making requests”. Explain how.
(8+8m)
b) What does it mean for one method to override another method from a parent class?
2. a) What is byte code? What are the advantages of translating a Java program into (8m)
byte code?
b) Explain various Arithmetic and Bitwise operators supported by Java and explain each
with examples. (8m)
3. a) Explain the difference between the method overloading and method overriding
with an example for each. (8m)
b) Distinguish between abstract methods and non-abstract methods with an example.
(8m)
4. a) Explain the difference between an interface and a class with an example each.

(8m)
b) Explain in detail various forms of interface implementations. (8m)

5. a) Briefly discuss the life cycle diagram of the thread and explain its stages. (8m)
b) What are built in exceptions? With an example, describe checked and unchecked
exceptions. (8m)
6. a) What is delegation event model? Briefly describe the roles of sources and listeners.
( 8m)
b) What are Event classes? When the ActionEvent is generated? Describe the integer
constants of ActionEvent class. (8m)

7. a)What is an applet? What packages are to be imported while writing an applet program?
Explain why those packages are needed? (8m)
b)Explain with an illustration the steps to follow to use a scroll pane. (8m)
8. a)What is a socket? Why are they important in modern communications? (4m)
b)Give the syntax of the following methods of DatagramPacket class and explain:
getAddress( ), getData( ), getLength( ), setAddress( ), setData( ) (12m)
1 of 1

www.micame.in
Code No: X0322 ^dͲϮ
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

OBJECT ORIENTED PROGRAMMING


(Mechanical Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

1. a) Explain the fundamental characteristics of Object Oriented Programming. (8+8m)


b) Explain how the members of a community interact with one another.
2. a) What is a variable? Explain the scope and lifetime of variable with appropriate (8m)
examples?
b)Write a Java program to print the following : (8m)
*****
****
***
**
*
3. a) What is an Object class? Explain the object hierarchy. (8m)
b) Explain the usage of super keyword with an example. (8m)

4. Explain the process of creating, defining, importing and accessing a package with suitable

examples. (16m)

5. a) Briefly discuss the thread priorities. (6m)


b) What is an Exception? Briefly discuss Termination and Resumption models of (10m)
exception handling. Is java uses termination or resumption model of exception handling?

6. a) Describe Event, Event Sources and Event Listeners? (8m)


b) Describe in detail about the AWT class hierarchy. (8m)

7. a)What is an applet? What are the two types of applets? Explain briefly. (8m)
b)Explain with an example the steps to follow to use a tree. (8m)

8. a)What is a port? List any four well-known ports. (6m)


b)Explain how multiple clients can be serviced by a server? (10m)

1 of 1

www.micame.in
^dͲϯ
Code No: X0322
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

OBJECT ORIENTED PROGRAMMING


(Mechanical Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

1. a) What is the need for Object Oriented paradigm? (8+8m)


b) What is a class inheritance hierarchy? How is it linked to classes and behavior?
2. a) What is Java Applet? How its creation does change internet programming? (8+8m)
b) Write a Java class Stack that implements a stack of integers. Write a tester program to
demonstrate Stack class.
3. a) What is dynamic method dispatch? Write a Java program to demonstrate dynamic
method dispatch. (8m)
b) Consider the following Java program:
public class MainTest
{
public static void main(String[] args)
{
C obj = new C( );
System.out.println(obj.max(13,29));
}
}
class A
{
int max( int x, int y)
{
if(x > y)
return x;
else
return y;
}
}
class B extends A
{
int max(int x, int y)
{
return super.max(y,x)-10;
}
}
class C extends B
1 of 2

www.micame.in
^dͲϯ
Code No: X0322

int max(int x, int y)


{
return super.max(x+10,y+10);
}
}
Find the output of the above program by stating the necessary reasons. (8m)
ϰ͘a) Explain the difference between an interface and an abstract class with an example.
(8m)
b) List and explain any four classes available in java.io package (8m)

5. a) What is an Exception? Explain the hierarchy of Exception types. (6m)


b) What is default exception handler? With an example java program, explain the same.
Is it essential to catch all types of exceptions? (10m)
6. a) What is an EventObject? What are the two methods of EventObject? Describe
AdjustmentEvent class. (8m)
b) What is Component class? In what way it is related to Container class? When the
ComponentEvent is generated and describe the component event types. (8m)
7. a) Why Swing applets are more popular than AWT based applets? (2m)
b) What are the three models JTable relies on? What are the steps required to set up a
simple JTable that can be used to display data? Explain with an example. (14m)

8. a) Explain client/server communication? (8m)


b) What is HTTP? How does it work? (8m)

2 of 2

www.micame.in
^dͲϰ
Code No: X0322
II B.Tech I Semester (R07) Regular Examinations, Nov- 2009

OBJECT ORIENTED PROGRAMMING


(Mechanical Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks

1. a) “One principal of object-oriented problem solving is the vehicle by which activities are
initiated”. Explain.
b) What is a class? How are classes linked to the behavior?
2. a) Explain how JAVA changed the Internet.
b) What is method overloading? Explain with an example.
3. a) Explain an abstract class with an example. (8m)
b) Explain the usage of final keyword. (6m)

c) What is the difference between print( ) and println( ) methods. (2m)

4.a) Explain the various forms of access protection in Java. (8m)


b) Explain the usage of StringTokenizer class with an example (8m)

5. a) Describe throw, throws and finally clauses. (9m)


b) What is Daemon thread? Differentiate between process and thread. (7m)
6. a) What are the Adapter classes? Briefly describe the MouseMotionAdapter class ( 8m)
b) What is a FocusEvent? In what way it is related to ComponentEvent ? Briefly describe
the FocusEvent Class. (8m)
7. a)How applet differs from an application? (8m)
b)Mention the two models on which JTree relies on. What are the various events
generated by JTree and what are the corresponding event listeners? Mention the
corresponding package for these classes and interfaces. (8m)
8. a)Explain how socket communication takes place. (8m)
b)What are factory methods? Explain the three commonly used InetAddress factory
methods. (8m)

1 of 1

www.micame.in

You might also like