4
Code No: 3220405 II B. Tech., II SEMESTER REGULAR EXAMINATIONS, APRIL/MAY 2009 OBJECT ORIENTED PROGRAMMING ( Common to C.S.E, CHEM, I.T, E.C.C ) Time: 3 Hours. Max. Marks: 80 Answer any FIVE questions. All questions carry equal marks. ******* 1. a) Describe agents, responsibilities, messages and methods in the way of viewing the world. b) Briefly describe the importance of the OOP paradigm. 2. a) With an example, explain scope and lifetime of variables. b) Describe the methods to modifying a string. 3. With an example, explain the inheritance for specialization, specification and construction. 4. a) What is an interface? In what way it is different from class? Describe the similarities between classes and interfaces. b) Describe the various forms of implementing interfaces. 5. a) Briefly describe the concepts of exception handling. b) Describe the importance of synchronizing threads. 6. a) Briefly describe Events, Event Sources and Event Listeners. b) Describe Mouse Event and Mouse Wheel Event classes. 7. a) Briefly describe the life cycle of an Applet. b) Describe Border and Grid Layout managers. 8. Write short notes on a. Tabbed Pane and Scroll Pane b. Daemon threads c. Check box group and Radio button *** SET - 1

Object Oriented Programming

  • Upload
    sudheer

  • View
    811

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Object Oriented Programming

Code No: 3220405

II B. Tech., II SEMESTER REGULAR EXAMINATIONS, APRIL/MAY 2009

OBJECT ORIENTED PROGRAMMING

( Common to C.S.E, CHEM, I.T, E.C.C )

Time: 3 Hours. Max. Marks: 80

Answer any FIVE questions. All questions carry equal marks.

*******

1. a) Describe agents, responsibilities, messages and methods in the way of

viewing the world.

b) Briefly describe the importance of the OOP paradigm.

2. a) With an example, explain scope and lifetime of variables.

b) Describe the methods to modifying a string.

3. With an example, explain the inheritance for specialization, specification

and construction.

4. a) What is an interface? In what way it is different from class? Describe

the similarities between classes and interfaces.

b) Describe the various forms of implementing interfaces.

5. a) Briefly describe the concepts of exception handling.

b) Describe the importance of synchronizing threads.

6. a) Briefly describe Events, Event Sources and Event Listeners.

b) Describe Mouse Event and Mouse Wheel Event classes.

7. a) Briefly describe the life cycle of an Applet.

b) Describe Border and Grid Layout managers.

8. Write short notes on

a. Tabbed Pane and Scroll Pane

b. Daemon threads

c. Check box group and Radio button

***

SET - 1

Page 2: Object Oriented Programming

Code No: 3220405

II B. Tech., II SEMESTER REGULAR END EXAMINATIONS, APRIL 2009

OBJECT ORIENTED PROGRAMMING

( Common to C.S.E, CHEM, I.T, E.C.C )

Time: 3 Hours. Max. Marks: 80

Answer any FIVE questions. All questions carry equal marks.

*******

1. a) “A super class variable can reference a subclass object”, describe in detail.

b) Describe agents, responsibilities, class hierarchies and method binding in

the way of viewing the world.

2. a) Briefly describe the type conversion mechanisms.

b) Write a java program to fix the float decimal places up to 4 digits, and

explain.

3. With an example, explain the inheritance for construction, extension and

limitation.

4. a) How do we add a class or an interface to a package?

b) With an example, explain the implementation of java interface.

5. a) Discuss Termination model and Presumptive models of exception handling.

b) Draw and explain the life cycle of a thread.

6. Write a program that draws a square. As the mouse moves over the drawing

area, repaint the square with the upper left corner of the square following the

exact path of the mouse cursor.

7. a) With an example, explain how will pass parameters to an Applet.

b) Describe Flow and Border Layout managers.

8. Write short notes on

a. Limitations of AWT

b. Adapter classes

c. Lists and choice

***

SET - 2

Page 3: Object Oriented Programming

Code No: 3220405

II B. Tech., II SEMESTER REGULAR END EXAMINATIONS, APRIL 2009

OBJECT ORIENTED PROGRAMMING

( Common to C.S.E, CHEM, I.T, E.C.C )

Time: 3 Hours. Max. Marks: 80

Answer any FIVE questions. All questions carry equal marks.

*******

1. a) With an example, explain java recursion mechanism.

b) Write a java program using command line arguments, and explain.

2. a) Explain with a java program about reference variables?

b) Describe java garbage collection mechanism?

3. With an example, explain the inheritance for extension, limitation and

combination.

4. a) What is CLASSPATH? Describe various levels of access protection.

b) What is an Adapter class? Briefly discuss Mouse Motion Adapter class.

5. What are built in exceptions? Create a java program to generate and catch an

Index out of Bounds Exception, and with an example prove that always finally

block will execute.

6. a) Write a program that randomly draws characters in different font sizes and

colours.

b) What is an Input Event? Briefly discuss its sub classes.

7. a) Differentiate between java applet and applications.

b) Describe Card and Grid bag Layout managers.

8. Write short notes on

a. Trees and Tables

b. Synchronization

c. inner classes

***

SET - 3

Page 4: Object Oriented Programming

Code No: 3220405

II B. Tech., II SEMESTER REGULAR EXAMINATIONS, APRIL/MAY 2009

OBJECT ORIENTED PROGRAMMING

( Common to C.S.E, CHEM, I.T, E.C.C )

Time: 3 Hours. Max. Marks: 80

Answer any FIVE questions. All questions carry equal marks.

*******

1. a) Briefly describe the importance of the OOP paradigm.

b) Write a simple java program using multi-way branch statement, and

explain.

2. a) Write a java program using any five String library functions.

b) What is a constructor? Describe its special properties.

3. Describe in detail the benefits of inheritance.

4. a) What is a package? Create a simple package and describe its usage?

b) With an example, explain the concept of extending interfaces.

5. a) Briefly describe exception hierarchy.

b) Briefly discuss the thread priorities.

6. a) Describe any four-mouse events.

b) Describe any four-window events.

7. a) Briefly describe the types of an apple.

b) Describe Grid and Card Layout managers.

8. Write short notes on

a) J Frame and J Component

b) MVC Architecture

c) Ports and Sockets

***

SET - 4