r09220503-objectorientedprogramming (2).pdf

4
JNTUWORLD Code No: R09220503 R09 Set No. 2 II B.Tech II Semester Examinations,Dec/Jan -2011/2012 OBJECT ORIENTED PROGRAMMING Common to Information Technology, Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer any FIVE Questions All Questions carry equal marks ????? 1. Discuss about various constructors defined in the following classes: (a) ImageIcon (b) JLabel (c) JTextField (d) JButton [15] 2. Explain in detail about the ways of achieving run-time polymorphism in Java with suitable program. [15] 3. Discuss the following string operations: (a) String Literals (b) String concatenation (c) String conversion (d) String constructors [15] 4. (a) Explain the way of viewing the world agents to oops. (b) Explain the way of viewing the world responsibilities about oops. [7+8] 5. (a) What is meant by polling? Discuss the built in mechanism in Java to avoid it. (b) What are the thread Synchronized methods in Java? Explain their usage with a sample Java program. [7+8] 6. Discuss in detail about nested and inner classes with examples. [15] 7. What is meant by AWT? What are the AWT classes contained in the Java.awt package? Discuss each of them briefly. [15] 8. (a) Write a program that copies content of one file to another file by removing unnecessary spaces between words. (b) Create an employee class. Write an employee manager program to update employee information using File Input Stream and File Output Stream class. [7+8] ????? 1 www.jntuworld.com www.jntuworld.com

Upload: saiteja1234

Post on 18-Sep-2015

220 views

Category:

Documents


0 download

DESCRIPTION

dssdsdsadsad

TRANSCRIPT

  • JNTUW

    ORLD

    Code No: R09220503 R09 Set No. 2

    II B.Tech II Semester Examinations,Dec/Jan -2011/2012OBJECT ORIENTED PROGRAMMING

    Common to Information Technology, Computer Science And EngineeringTime: 3 hours Max Marks: 75

    Answer any FIVE QuestionsAll Questions carry equal marks

    ? ? ? ? ?

    1. Discuss about various constructors defined in the following classes:

    (a) ImageIcon

    (b) JLabel

    (c) JTextField

    (d) JButton [15]

    2. Explain in detail about the ways of achieving run-time polymorphism in Java withsuitable program. [15]

    3. Discuss the following string operations:

    (a) String Literals

    (b) String concatenation

    (c) String conversion

    (d) String constructors [15]

    4. (a) Explain the way of viewing the world agents to oops.

    (b) Explain the way of viewing the world responsibilities about oops. [7+8]

    5. (a) What is meant by polling? Discuss the built in mechanism in Java to avoidit.

    (b) What are the thread Synchronized methods in Java? Explain their usage witha sample Java program. [7+8]

    6. Discuss in detail about nested and inner classes with examples. [15]

    7. What is meant by AWT? What are the AWT classes contained in the Java.awtpackage? Discuss each of them briefly. [15]

    8. (a) Write a program that copies content of one file to another file by removingunnecessary spaces between words.

    (b) Create an employee class. Write an employee manager program to updateemployee information using File Input Stream and File Output Stream class.

    [7+8]

    ? ? ? ? ?

    1

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: R09220503 R09 Set No. 4

    II B.Tech II Semester Examinations,Dec/Jan -2011/2012OBJECT ORIENTED PROGRAMMING

    Common to Information Technology, Computer Science And EngineeringTime: 3 hours Max Marks: 75

    Answer any FIVE QuestionsAll Questions carry equal marks

    ? ? ? ? ?

    1. (a) Write short notes on costs of Inheritance.

    (b) Discuss the different ways in which Java achieves one interface, multiplemethods aspect of polymorphism. [7+8]

    2. (a) Explain in detail about accessing a package.

    (b) Write short note on CLASSPATH environmental variable. [7+8]

    3. (a) What is a class and object? Is there any relationship between them.Explain.

    (b) What is a member function and data members? Explain briefly. [7+8]

    4. Discuss with a sample Java program how to pass parameters to Applets. [15]

    5. Discuss in detail about Autoboxing and Metadata in Java. Write sample Javaprograms to describe each of them. [15]

    6. (a) What are Scroll bars? List out and explain various constructors and methodsdefined in it.

    (b) Write a sample Java program to demonstrate the usage of Scroll bars. [7+8]

    7. What are Javas unchecked exceptions defined in Java.lang? Explain them withsuitable examples. [15]

    8. Explain the method that initialize the object with an example. [15]

    ? ? ? ? ?

    2

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: R09220503 R09 Set No. 1

    II B.Tech II Semester Examinations,Dec/Jan -2011/2012OBJECT ORIENTED PROGRAMMING

    Common to Information Technology, Computer Science And EngineeringTime: 3 hours Max Marks: 75

    Answer any FIVE QuestionsAll Questions carry equal marks

    ? ? ? ? ?

    1. (a) Explain different types of class hierarchies.

    (b) Give the advantages of OOP. [10+5]

    2. Discuss briefly about the following.

    (a) Javas unchecked RuntimeException subclasses

    (b) Javas checked exceptions

    (c) Multiple catch clauses. [15]

    3. (a) Differentiate between Abstract class and Concrete class.

    (b) Explain how the Abstract class is implemented in the class with an example.[7+8]

    4. State and explain various methods defined by Applet class. [15]

    5. (a) Explain with an example how to create threads by implementing the Runnableinterface.

    (b) What is meant by thread priority? Discuss its significance with a sample Javaprogram. [7+8]

    6. What are the methods defined by Object Output and Object Input class? Explain.[15]

    7. (a) Differentiate between method overloading and method overriding.

    (b) Write a program to implement the method overloading. [7+8]

    8. Write Java program for handling keyboard events. [15]

    ? ? ? ? ?

    3

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: R09220503 R09 Set No. 3

    II B.Tech II Semester Examinations,Dec/Jan -2011/2012OBJECT ORIENTED PROGRAMMING

    Common to Information Technology, Computer Science And EngineeringTime: 3 hours Max Marks: 75

    Answer any FIVE QuestionsAll Questions carry equal marks

    ? ? ? ? ?

    1. (a) What is meant by the class scope. Explain.

    (b) How object is created for the class in java? Explain it with the syntax andexample. [8+7]

    2. (a) What is meant by multithreaded programming? Explain with a sample Javaprogram the Java thread model.

    (b) Explain with a sample Java program how to create threads. [8+7]

    3. (a) Explain about this keyword with an example.

    (b) Differentiate between C++ and java? [7+8]

    4. (a) Discuss in detail about nested Interfaces.

    (b) What happens when an Interface is partially implemented? Explain. [7+8]

    5. List out various Swing component classes and explain them clearly. [15]

    6. (a) Distinguish between TextField and TextArea classes.

    (b) Write a sample Java program to demonstrate the usage of TextArea. [7+8]

    7. (a) Define multiple inheritance. Does Java Support multiple inheritance. Justifyyour answer.

    (b) Write java program to implement the multilevel Inheritance. [7+8]

    8. What are the Javas built-in exceptions? List the checked exceptions defined in theJava.lang and explain them clearly with suitable examples. [15]

    ? ? ? ? ?

    4

    www.jntuworld.com

    www.jntuworld.com