Code: AC19                                                   Subject: INTERNET & JAVA PROGRAMMING

Flowchart: Alternate Process: DECEMBER 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.       What will be the output of the following:

public class Test1 {

    static int nvalue = 10;

    static {

                    nvalue += nvalue++;

               }

public static void main(String args[])

              {

                    System.out.println(nvalue);

               }                   }                          

                                                                                                                                                                                                                                                                                                         

(A)    11                                                (B)  12

(C)  Error                                            (D)  Compilation error

 

b.      Give the output of the program:

public class Test {

                     public static void main(String a[])

                        {

                           System.out.println(“15 & 25=”, +(15&25));

                        }                                 }                                                                          

 

(A) 15 & 25 = 1                                  (B)  15 & 25 = 13

(C) 15 & 25 = 9                                  (D)  15 & 25 = 0

            

             c.   Give the output of the following if x=70 & y=10

                   class Test1 {

                                 public static void main(String args[])

                                   { int x,y,a;

                                      a = x>y ? x : y ;

                                       system.out.println(“a = ”+a);

                                    }                         }

                  

(A)    a=70                                            (B)  a=80

(C)  a is undefined                               (D)  Error displayed at runtime

 

 

 

             d.   The AWT object includes components for handling:

 

(A)     many types of events associated with a GUI, such as mouse clicks, mouse movements, pressed keys etc.                                                        

(B)    create condition checks.

(C)  create efficient graphics.              

(D)  perform bit wise logical operations.   

 

             e.   In TCP/IP, which of the following statements is true?

                                      

(A)     TCP provides a connection oriented and reliable service over connection less and unreliable IP.         

(B)     TCP provides a connection oriented service over connection oriented and reliable IP.

(C)     TCP provides a connection oriented service over connection oriented and unreliable IP.         

(D)    None of the above.

       

             f.    ICMP refers to one of the following:

                                      

(A)     International Control Mask Protocol.

(B)     Internet Control Message Protocol.

(C)     Internet Communication Message Protocol.

(D)    Intranet Control Message Protocol.

 

             g.   The protocol used by the recipient to receive the email from the mailbox is

  

(A)     SMTP                                         (B)  FTP

(C)  HTTP                                          (D)  POP

 

             h.  DNS refers to which of the following statements:

                 

(A)    To allow each organization to set up its own network.

(B)    To allow each client-server interaction.

(C)    To assign names to computers without informing the central authority

(D)    Name computers according to their IP numbers.

 

             i.    What will be the output of the following:

                   int x, a=10, b=40;

                   x = ((a<b) || (a = 5)) ? a: b;

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

 

(A)   x=10                                            (B)  x=20

(C) Error                                             (D)  x=5

 

             j.    Which keyword inhibits a class in a package from accessibility by the classes outside the current package?

            

(A)  protected                                     (B) public

(C)  final                                              (D) default


 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

  Q.2     a.   Explain the differences between java applet and a java program.  Give one example of each.                                                                      (4)

 

             b.   What are interfaces in Java and what is its purpose?                                            (5)

 

             c.   Write a program in Java to define an interface for finding the area of a geometrical shape and implement the same in two different classes, Rectangle and Circle.                                                            (7)

 

  Q.3     a.   Explain the differences between:

(i)                  Connectionless and Connection-oriented networks.                    (4)

(ii)                Unicast and Multicast IPv6 address.                                           (3)

(iii)               SMTP and POP.                                                                       (4)

                                              

             b.   Write a program in Java for getting IP address of a fully qualified host name.       (5)

 

  Q.4     a.   What are the different techniques of address translation?                                     (6)

 

             b.   Explain the classes of IP addresses.                                                                    (5)          

 

             c.   Explain the advantages of using virtual packets instead of frames.                        (5)

 

  Q.5     a.   Give the format of IP header and explain the semantics of each field.                   (7)

 

             b.   An application uses UDP to send 8K byte messages across an Ethernet.  Compute the number of frames that traverse the network.                     (4)

 

             c.   How is data fragmented and again reassembled in TCP/IP?                                (5)          

 

  Q.6     a.   Explain the three broad categories into which, the web documents are defined, namely: static, dynamic and active.                                                 (6)

 

             b.   What is FTP? Is it possible to access a file through FTP without having a valid user name and password? If yes, then how and what is it known as? What are the uses of this facility?                            (5)       

 

             c.   Explain in brief functioning of the mail gateways with its purpose.                         (5)

 

  Q.7     a.   What is CGI script?  Explain its purpose in brief.                                                (3)   

 

             b.   What are the differences between AWT component and Swing component?                      (3)

 

             c.   How many layout managers available in java? Discuss about them.                  (2+5)

 

             d.   Discuss the caching technique in web browser.                                                   (3)


  Q.8     a.   How many types of stream based I/O possible in java?                                       (3)

       

             b.   What are the abstract classes for handling byte stream and character stream? Discuss about them.                                                             (5)

 

             c.   What are the differences between java class and java bean class?                       (4)

 

             d.   Briefly describe Remote Method Invocation.                                                      (4)

 

  Q.9     a.   Explain the difference in syntax and operations among the different methods in Java defined for Blocking a thread.                                                 (6)                                                             

 

             b.   Explain multithreading facilities in the form of methods in Java.                             (5)

 

             c.   Explain exception handling technique in Java.                                                      (5)