Code: C–19                                                   Subject: INTERNET & JAVA PROGRAMMING

Time: 3 Hours                                                    June 2006                                                  Max. Marks: 100

 

NOTE: There are 9 Questions in all.

·      Question 1 is compulsory and carries 20 marks. Answer to Q. 1. must be written in the space provided for it in the answer book supplied and nowhere else.

·      Out of the remaining EIGHT Questions answer any FIVE Questions. Each question carries 16 marks.

·      Any required data not explicitly given, may be suitably assumed and stated.

 

 

Q.1       Choose the correct or best alternative in the following:                                         (2x10)

       

a.       The ping command does not let the user to

 

                   (A)  compute the round trip time.        

                   (B)  determine the cause of no response from the destination machine.

(C)    specify the size of the packet sent.                                                                            

(D)  repeatedly send one message per second.

       

b.      The notation of IPv4 addresses is known as

 

(A)    Colon hexadecimal.                      (B)  Colon decimal.

(C)  Dotted hexadecimal.                     (D)  Dotted decimal.

            

             c.   Which of the following field in the IP datagram header is changed by every router through which the datagram passes?

                  

(A)    version                                         (B)  Source Address

(C)  Header Checksum                        (D)  Destination Address

 

             d.   The protocol that has made the movement of the web documents possible is

 

(A)    SMTP.                                       (B) FTP.

(C)  POP.                                           (D) HTTP.

 

             e.   What will be the output of the following code segment?

               int         a = 10, b = 20;

               if ((a < b) || (a = 5) > 10)

                           System.out.println(“a = “ + a);

                       else      System.out.println(“b = “ + b);              

       

(A)     a = 10                                          (B)  b = 20

(C)  a = 5                                            (D)  b = 5

       

             f.    When we invoke repaint()for a Component, the AWT invokes the method:

 

(A)     paint()                                          (B)  draw()

(C)  show()                                         (D)  update()

 

             g.   Which keyword can protect a class in a package from accessibility by the classes outside the package?

                              

(A)     protected                                     (B)  public

(C)  final                                              (D)  Don’t use keyword at all (make it

                                                                   default)          

 

             h.   Suppose S1 and S2 are two strings. Which of the following statements or expressions are correct?

 

(A)    String S3 = S1 + S2;                    (B) S1 <= S2

(C) String S3 = S1 – S3;                     (D) All of the above.

 

             i.    Which of the following method lets the main thread to wait for a child thread to finish?

 

(A)   sleep()                                          (B)  wait()

(C) join()                                             (D)  isAlive()

 

             j.    Which of the following is not a wrapper class?

 

(A)  Byte                                             (B)  Vector

(C)  Boolean                                       (D) Character

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

  Q.2     a.   Design a web page using HTML to do the following:

                   (i)    The title bar of the web page should be: “Programming Paradigms”.

                   (ii)   The body contents of the web page should be:

                           There are two programming paradigms:

·        Process oriented model

·        Object oriented model

(iii)       Both the models in (ii) above are hypertexts which on clicking give appropriate explanations about them. The process oriented model is to be linked to “process.htm” and object oriented model is to be linked to a location in the same document. Also give the code for process.htm.

(iv)       The file “bg.gif” is to be used as background of the web page.                    (9)          

             b.   What do you understand by address resolution? Briefly explain the following algorithms of address resolution:

(i)                  Table lookup.

(ii)                Closed form computation.

(iii)               Message exchange.                                                                    (7)

       

  Q.3     a.   What is MTU? How do IP routers handle the problem of networks with heterogeneous MTUs? What information is added / changed in the IP datagram header to enable destination to reconstruct the datagram sent by the source?                                                                                            (6)                     

            

 

             b.   How does caching and replication improve the performance of DNS?                 (4)          

             c.   How does a server handle multiple concurrent requests from the clients?             (3)          

             d.   What does CC and BCC stand for when sending an email? What is the difference between the two?                                                                     (3)                                                             

 

  Q.4     a.   Describe the following entries of an IPv6 datagram header and compare them with the corresponding entries of an IPv4 datagram header:               

(i)                  Hop limit.

(ii)                Payload length.

(iii)               Next header.                                                                                          (6)

             b.   Differentiate between the following:                                                                        

(i)                  Internet and World-Wide-Web.

(ii)                FTP and TFTP.

(iii)               TCP and UDP.                                                                                      (6)

             c.   List and briefly explain any four major features of TCP.                                       (4)

 

  Q.5     a.   Differentiate between the following:     

(i)                  method overloading and method overriding.

(ii)                static and instance members of a class.                                                   (6)

             b.   What are servlets? Describe the various phases in the life cycle of servlets.          (6)

             c.   Briefly explain what functions do the socket APIs socket() and send() perform?                  (4)       

 

  Q.6     a.   What are the following components of Delegation Event Model of Java? Explain with the help of examples.

(i)                  Events

(ii)                Event sources

(iii)               Event listeners.                                                                                       (6)

             b.   How are the following code segments handled by Java?                                         

(i)                  int x = 0, y = 1; int z = y / x;

                   (ii)      try { … }

                              catch (Exception e) { System.out.println(“Exception Caught”); }

                              catch (ArithmeticException e)

                    { System.out.println(“Arithmetic Exception Caught”); }                   (4)

             c.   If it is not possible to create object of abstract classes, then why is this feature provided?                (3)

             d.   What do you understand by AWT Controls? What are the various controls supported by AWT?                                                               (3)

 

  Q.7     a.   Write a Java program to search for a string in an array of strings. The user enters search string and the array of strings through the keyboard. The user gets the output as the position of the search string in the array of strings.                                                 (8)    

             b.   What are Charsets and Selectors in the new I/O system of Java?                        (4)

             c.   How can multiple inheritance be implemented in Java?                                        (4)


 

  Q.8     a.   Write a Java program to read in a matrix from the keyboard and display it in the matrix form by overloading toString() method.                                (6)

             b.   Write an applet to display the following figure:

                                         (10)          

 

  Q.9           Write short notes on: (any FOUR)

                  

(i)                  Synchronization of threads

(ii)                Remote method Invocation

(iii)               Java Beans

(iv)              Packages                                                                                                  

(v)                IP telephony

(vi)              ICMP                                                                                                  (16)