Code: AC–19                                                   Subject: INTERNET & JAVA PROGRAMMING Flowchart: Alternate Process: JUNE 2007

Time: 3 Hours                                                                                                     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.       Once an organization owns a particular domain, it cannot on its own change ___________ of the domain name.

 

(A)    prefix                                           (B)  suffix

(C)  middle                                          (D)  any part

 

b.      Using __________ command of FTP, more than one local file can be sent to the remote computer.

 

(B)    mput                                            (B)  mget

(C) put                                                (D)  get

            

             c.   The IP address with all 1’s represents

                  

(A)    this computer                                (B)  loopback address

(C)  limited broadcast                          (D)  directed broadcast

 

             d.   TCP/IP network is consisted of ________ layers.

 

(A)    1                                                      (B)  2

(C)  3                                                 (D)  4       

 

             e.   The ping program uses __________ protocol to test reachability.

                  

(A)     ICMP                                          (B)  POP

(C)  FTP                                             (D)  HTTP

       

             f.    Which of the following is false for constructors?

                  

(A)     It is automatically executed when an object is created.

(B)     A constructor's name is same as class name.

(C)     A constructor cannot have a return type.

(D)    It can be a private member of the class.

 

 

 

 

             g.   In dynamic method dispatch,

  

(A)     at least one method in the base class and one in derived class must have same name and signatures.    

(B)     all the methods in the base class and the derived class must have same name and signatures.

(C)     at least one method in the base class and one in derived class must have different name and signatures. 

(D)    all the methods in the base class and the derived class must have different name and signatures.

 

             h.  What is the output of the following function in terms of x and y?

         void dummy(float x, float y) {

               float r = x, q = 0;

               while (y <= r) {

                           r = r – y; q = q + 1;

               }

               System.out.println(“q = ” + q);

               }                     

 

(A)    x / y                                             (B)  (int) x % (int) y

(C)  x % y                                           (D)  (int) (x / y)

 

             i.    Which of the following methods is called to restart an applet after it has stopped?

 

(A)   action()                                         (B)  update()

(C) start()                                            (D)  init()

 

             j.    Which of the following classes is available in java.lang?

            

(A)  Object                                         (B) Stack

(C)  s3 = = s1                                     (D) Vector

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

  Q.2     a.   How does TCP achieve reliability in data transmission?  Explain.                         (6)

 

             b.   What are the differences between TCP and UDP protocols?                              (6)

 

             c.   What do you mean by MIME. Discuss the role of MIME in context of Internet application.                                                                       (4)

 

  Q.3     a.   What do you mean by “Remote Method Invocation”. Discuss the architecture of RMI implementation in Java.                                                   (2+3)                                                                   

 

             b.   Discuss about the Event Delegation model in java. Discuss the role of Listener in Event Delegation model.                                                              (2+3)

             c.   Write an Applet program, which can display a sample form.                                (6)

            

 

  Q.4     a.   How many components are there in an email address and what do they represent? What are the protocols used for sending and receiving email. Discuss about them.                                                   (8)

 

             b.   What are the two transfer modes of FTP?  Compare them.                                 (4)          

 

             c.   Explain the H.323 standard used for VoIP.                                                         (4)

 

 

  Q.5     a.   How do multiple services run on a computer?  What are its advantages?  How can a client unambiguously identify the desired service on such computers?                                                                 (6)

 

             b.   What are the three basic types of web documents?  What are the advantages and disadvantages of the three?                                                  (6)

 

             c.   What does the text beyond the question mark in the URL represent?  Explain.                    (4)       

 

 

  Q.6     a.   Design an applet “newDocument” that displays a button.  On button press, the browser must load the document “http://www.nonexist.com/newdocument”.                                          (8)

 

             b.   Write the HTML code that displays “New Document” in the title bar and executes the “newDocument” applet of Q.6 a.                                   (4)                                                             

 

             c.   What is the difference between String and StringBuffer?                                      (4)

 

 

  Q.7     a.   Write a program to create a thread “A”, which creates two child threads “B” and “C”.  “A” must terminate after both “B” and “C” have terminated.  “B” and “C” must print their own names 100 times and then terminate.                                            (8)   

 

             b.   What do you understand by polymorphism? Briefly explain Dynamic Method Dispatch with the help of an example.                                              (8)

 

 

  Q.8     a.   What do you understand by portability of code?  Are Java programs portable?  Justify your answer.                                                                      (3)

       

             b.   What is java.nio?  How does it differ from java.io?                                             (4)          

 

             c.   Write a Java program to create a class “rectangle”.  The rectangle is defined by two objects bottomLeft and upperRight of the type “point”. “point” is a class having two members: x and y.  Write the constructors for both the classes.  Write a method in “rectangle” to display the two points.           (9)


 

  Q.9     a.   What is a Servlet?  Briefly explain the steps to create a simple servlet using Tomcat.            (5)       

 

             b.   What is Java Swing?  What are the advantages of Swing components over AWT components?                                                                 (5)

 

             c.   Briefly explain the following in the context of Java Beans:

(i)                  BDK                          

(ii)                JAR files

(iii)               Introspection                                                                              (6)