OBJECT ORIENTED PROGRAMMING (PDF)

Document Sample
OBJECT ORIENTED PROGRAMMING (PDF) Powered By Docstoc
					Split by PDF Splitter




    Code No: V0524
                                                                                                           SET - 1
                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                                   OBJECT ORIENTED PROGRAMMING
                                           (Common to CSE, CHEM, IT, ECC)
     Time: 3 Hours                                                                                      Max Marks: 80
                                               Answer any FIVE Questions
                                              All Questions carry equal marks



         1. a) What is an object oriented programming? How is it different from procedure oriented programming?
            b) Write a Java program to display the exchange of two given integers using bit-wise operators.
                                                                                                     (8+8M)

         2. a) What is a class? Compare a concrete class and an abstract class. Give an example of Java code.
            b) Compare String class and String Buffer class with an example of fraction of Java program code.
                                                                                                     (8+8M)

         3. a) What is an Object class? Explain the Object hierarchy.
            b) Compare method overloading and method overriding with an example each.                    (8+8M)

         4. a) What is a Java package? What is a CLASSPATH? Explain how to create and access a Java package
               with an example.
            b) What is an interface? What is its use? Write a Java program to demonstrate implementing, applying,
                and extending an interface.                                                         (8+8M)

         5. a) Can there be a try block without a matching catch block? Give an example. Write a Java program
                that illustrates the application of multiple catch statements.
            b) What is a thread? What are daemon threads? Explain about thread synchronization in Java.
                                                                                                        (8+8M)
         6. a) What is an event handling? What is an adapter class? Explain with an example.
            b) What is a Layout Manager? Explain the different types of Layout Managers with suitable examples.
                                                                                                        (8+8M)
         7. a) Write a Java program to pass the parameters to an applet.
            b) Write a swing application to create and display the label containing both icon and string.
                                                                                                        (8+8M)

         8. a) What is a Socket? What are the two important TCP Socket classes? Explain.
            b) Write a Java program at server side that will receive a connection from a client, send a string to the
                client, and closes the connection. Explain the program.                                 (8+8M)




                                                               1of 1
Split by PDF Splitter




    Code No: V0524
                                                                                                        SET - 2
                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                                   OBJECT ORIENTED PROGRAMMING
                                          (Common to CSE, CHEM, IT, ECC)
     Time: 3 Hours                                                                                   Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks



         1. a) What is byte code in Java? Why Java does not support pointers? Explain.
            b) Write a Java program to reverse a given long integer.                                   (8+8M)

         2. a) Write a Java program to covert the given decimal number into binary number using recursion.
            b) What are nested classes and inner classes? Demonstrate with an example.              (8+8M)

         3. a) Distinguish between abstract methods and non-abstract methods with an example.
            b) What is dynamic method dispatch? Write a Java program to demonstrate dynamic method dispatch.
                                                                                                (8+8M)

         4. a) What is a Java package? What is a CLASSPATH? Explain how to create and access a Java package
                with an example.
            b) Explain, in detail, the various forms of interface implementations.             (8+8M)

         5. a) Compare the keywords: throw and throws? Write a Java program to demonstrate throw and throws.
            b) Write a Java program that creates two threads. First thread prints the numbers from 1 to 50 and the
                other thread prints the numbers from 100 to 50.                                        (8+8M)

        6.  a) What is an event handling? Name and explain any four event classes available in java.awt.event
                package.
            b) What is a Layout Manager? Explain the different types of Layout Managers with suitable examples.
                                                                                                         (8+8M)
         7. a) What is a Java applet? What are the different stages in the life cycle of an applet? Explain.
            b) Explain, in detail, the swing controls: TabbedPanes and ScrollPanes with suitable Java code
                examples.                                                                               (8+8M)

         8. a) What is a network programming? How are different machines in a network addressed? Explain.
            b) What is a port? What is the difference between a port and a socket? Explain with an example.
                                                                                                     (8+8M)




                                                              1of 1
Split by PDF Splitter




    Code No: V0524
                                                                                                        SET - 3
                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                                   OBJECT ORIENTED PROGRAMMING
                                          (Common to CSE, CHEM, IT, ECC)
     Time: 3 Hours                                                                                   Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks



         1. a) Explain, in detail, the working of Java Virtual Machine (JVM).
            b) What is an anonymous array? Give an example.                                           (8+8M)


         2. a) Write a Java program that counts the number of objects created in that Java program.
            b) Compare static and final methods. Write a Java program to demonstrate the usage of static and final
             methods                                                                                (8+8M)

         3. a) Write a Java program to demonstrate the keyword: super to call super-class constructors.
            b) What is dynamic method dispatch? Write a Java program to demonstrate dynamic method dispatch.
                                                                                                     (8+8M)

         4. a) Explain the difference between an interface and a class with an example each.
            b) Explain, in detail, the various forms of interface implementations.                    (8+8M)


         5. a) What is an Exception? How is an Exception handled in Java? Explain the different types of
                exceptions in Java.
            b) What is a thread? What are daemon threads? Explain, in detail, the thread synchronization in Java.
                                                                                                     (8+8M)

        6.   a) Write a Java program to handle mouse and keyboard events.
             b) What is an AWT class? Name and explain any four AWT classes available in java.awt package.
                                                                                                  (8+8M)

         7. a) Write a Java program to create an Applet with SIX buttons representing your favorite six colors.
               When a button is clicked, the background colour must change to the corresponding colour.
            b) What is a Swing? What is the difference between Swing and AWT? Describe, in detail, about
            various components in Swing.                                                              (8+8M)


         8. a) What is an IP address? What are the different types of IP addressing? Explain with an example.
            b) What is an InetAddress? Write a Java program that demonstrates the concept of InetAddress.
                                                                                                      (8+8M)


                                                          1of 1
Split by PDF Splitter




    Code No: V0524
                                                                                                         SET - 4
                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                                   OBJECT ORIENTED PROGRAMMING
                                           (Common to CSE, CHEM, IT, ECC)
     Time: 3 Hours                                                                                    Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks



         1. a) What is inheritance? Explain the concepts of reusability and extensibility with an example.
            b) What is data abstraction? Compare data hiding and data encapsulation with an example.
                                                                                                      (8+8M)

         2. a) Write a java program to display the integer numbers from 1 to 100 without using loops.
            b) Write a Java program to demonstrate constructor overloading.                          (8+8M)

         3. a) What is an Object class? Explain the Object hierarchy.
            b) Compare inheritance and polymorphism. Write a Java program to demonstrate the keyword: super to
                call super-class constructors.                                                  (8+8M)

         4. a) Explain, in detail, the process of creating, defining, importing and accessing a package.
            b) Write a Java program to demonstrate multiple inheritance using interfaces.                (8+8M)

         5. a) What is an Exception? How is an Exception handled in Java? Compare checked and unchecked
                exceptions in Java?
            b) Compare and contrast a process based multitasking and a thread based multitasking. (8+8M)

         6. a) What is an event handling? What is an adapter class? Explain with an example.
            b) Write a Java program to change the colour of the frame when a button is clicked with the mouse.
                                                                                                      (8+8M)

         7. a) What is a Java applet? How do applets differ from application programs? Explain with an example.
            b) Explain the difference between AWT Controls and Swing Controls in detail with suitable Java Code
               examples.                                                                              (8+8M)

         8. a) What is an URL? Explain the URL connection with an example.
            b) What is an InetAddress? Write a Java program that demonstrates the concept of InetAddress.
                                                                                                   (8+8M)




                                                           1of 1

				
DOCUMENT INFO
Shared By:
Stats:
views:115
posted:2/9/2011
language:English
pages:4
Description: OBJECT ORIENTED PROGRAMMING