object oriented programming

4
JNTUWORLD Code No: V0524 II B.Tech II Semester, Supplementary Examinations, Nov/ Dec - 2011 OBJECT ORIENTED PROGRAMMING (Com. to CSE, CHEM, IT, ECC) Time: 3 hours Max. Marks: 80 Answer any FIVE Questions All Questions carry equal marks 1. a) Describe the history of Java. Can java run on any machine? What is needed to run java on a computer? b) Explain the oop paradigm. (8M+8M) 2. a) Define an array? How it is defined in java? Explain with suitable example b) Explain the concept of classes, objects and constructor overloading. (8M+8M) 3. a) define the following terms with suitable example i) super class ii) sub class b) Explain the difference between method overloading and method overriding (8M+8M) 4. a) What is package? How user defined packages are created and invoked into the program. Explain b) Explore the java.util.* (8M+8M) 5. a) Explain the concept of exception handling in detail. b) Explain the built-in exceptions creating own exception sub classes. (8M+8M) 6. Explain the mouse and key event handling mechanism in java. (16M) 7. What is an applet? Explain the creation of Applet, passing parameters to the applet and adding graphics and colors to the applets with suitable example. (16M) 8. a) What is network programming? Explain addresses, ports, sockets in detail b) Explain the java.net package (8M+8M) 1 of 1 SET - 1 R07 www.jntuworld.com www.jntuworld.com

Upload: saiteja1234

Post on 08-Nov-2015

215 views

Category:

Documents


0 download

DESCRIPTION

vcxxcx

TRANSCRIPT

  • JNTUW

    ORLD

    Code No: V0524

    II B.Tech II Semester, Supplementary Examinations, Nov/ Dec - 2011

    OBJECT ORIENTED PROGRAMMING (Com. to CSE, CHEM, IT, ECC)

    Time: 3 hours Max. Marks: 80 Answer any FIVE Questions

    All Questions carry equal marks

    1. a) Describe the history of Java. Can java run on any machine? What is needed to run java on a computer?

    b) Explain the oop paradigm. (8M+8M)

    2. a) Define an array? How it is defined in java? Explain with suitable example b) Explain the concept of classes, objects and constructor overloading. (8M+8M)

    3. a) define the following terms with suitable example i) super class ii) sub class b) Explain the difference between method overloading and method overriding (8M+8M)

    4. a) What is package? How user defined packages are created and invoked into the program. Explain

    b) Explore the java.util.* (8M+8M)

    5. a) Explain the concept of exception handling in detail. b) Explain the built-in exceptions creating own exception sub classes. (8M+8M)

    6. Explain the mouse and key event handling mechanism in java. (16M)

    7. What is an applet? Explain the creation of Applet, passing parameters to the applet and adding graphics and colors to the applets with suitable example. (16M)

    8. a) What is network programming? Explain addresses, ports, sockets in detail b) Explain the java.net package (8M+8M)

    1 of 1

    SET - 1 R07

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: V0524

    II B.Tech II Semester, Supplementary Examinations, Nov/ Dec - 2011

    OBJECT ORIENTED PROGRAMMING (Com. to CSE, CHEM, IT, ECC)

    Time: 3 hours Max. Marks: 80 Answer any FIVE Questions

    All Questions carry equal marks

    1. a) Explain the class hierarchy in java b) Explain the classes and instances in java with suitable example. (8M+8M)

    2. a) Explain various data types in java. b) Explain various access controls defined in java in detail. (8M+8M)

    3. Explain the following with suitable example. i) Specialization ii) Specification iii) Construction iv) Member access rules (4M+4M+4M+4M)

    4. a) What is CLASSPATH? How it is used in java. Explain b) Define an interface? List the difference between classes and interfaces (8M+8M)

    5. a) Define a thread and explain the life cycle of thread. b) Write a simple program using multiple threads. (8M+8M)

    6. Explain the various user interface components in AWT in detail. (16M)

    7. Differentiate following with suitable example a) Frame, Frame b) Applet, Applet c) Menu, JMenu (5M+5M+6M)

    8. a) Explain the simple client server concept with suitable example? b) Explain the package java.util. (8M+8M)

    1 of 1

    SET - 2 R07

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: V0524

    II B.Tech II Semester, Supplementary Examinations, Nov/ Dec - 2011

    OBJECT ORIENTED PROGRAMMING (Com. to CSE, CHEM, IT, ECC)

    Time: 3 hours Max. Marks: 80 Answer any FIVE Questions

    All Questions carry equal marks

    1. Explain the following a) Methods b) Classes and instances c) Class hierarchy d) Method binding (4M+4M+4M+4M)

    2. a) Explain the various control statements in java. b) Explain concepts of classes, objects and constructors. (8M+8M)

    3. a) What inheritance? How it is defined in java. Explain b) What is polymorphism? How it is defined in java. Explain (8M+8M)

    4. a) What is package? How it is created in java. Explain b) Define the following terms: abstract classes, interfaces. What are the similarities and

    differences between abstract classes and interfaces? (8M+8M)

    5. a) Define multi threading and multi tasking. List the differences between them b) Explain the daemon threads and tread groups in detail. (8M+8M)

    6. a) How event driven programming is different from procedure oriented programming b) Event handling mechanism in Java. (8M+8M)

    7. a) Explain the life cycle of an Applet. What are the difference between the applets and applications? Explain.

    b) What is a Swing? How is different from a AWT. Explain. (8M+8M)

    8. What do you mean by URL? How to create an URL? Explain several methods provided by URL? Give appropriate examples (4M+4M+8M)

    1 of 1

    SET - 3 R07

    www.jntuworld.com

    www.jntuworld.com

  • JNTUW

    ORLD

    Code No: V0524

    II B.Tech II Semester, Supplementary Examinations, Nov/ Dec - 2011

    OBJECT ORIENTED PROGRAMMING (Com. to CSE, CHEM, IT, ECC)

    Time: 3 hours Max. Marks: 80 Answer any FIVE Questions

    All Questions carry equal marks

    1. a) Explain the summary of the oop concepts b) Explain various abstraction mechanisms defined in java (8M+8M)

    2. a) Explain the Java buzzwords in detail b) Explain overloading methods with suitable example (8M+8M)

    3. a) How do you explicitly invoke a super classs constructor from the subclass? b) Explain the method overriding and abstract classes in detail (6M+10M)

    4. a) What is interface? List differences between the interfaces and classes b) Explore the java.io.* (8M+8M)

    5. a) Explain the following terms: i) Exception hierarchy ii) Benefits of exception b) Explain the life cycle of the thread with neat block diagram (8M+8M)

    6. What are the methods supported by the following interfaces. Explain a) Action Listener b) Mouse Motion Listener c) Text Listener (5M+5M+6M)

    7. Create an applet with two toolbars. One toolbar should be created using JButtons and a separator and another toolbar should be created using 3 custom Action classes. Add one to the "north" and another to the "south" sides of border layout. When the user clicks one of the buttons in the toolbar, it will print a message to the console stating that which button is being pressed from which toolbar. Add functionalities to the buttons such as New, Open, Close, Save, Cut, Copy, Paste. (16M)

    8. a) What is a port? What is the difference between port and socket? b) Explain the several methods provided by URL? (8M+8M)

    1 of 1

    SET - 4 R07

    www.jntuworld.com

    www.jntuworld.com