Flowchart: Alternate Process: DECEMBER 2008Code: AC19                                                                                               Subject: INTERNET &

                                                                                                               JAVA PROGRAMMING

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.  Which Layer is not present in TCP/IP model?

 

                  (A)  Application Layer                          (B)  Internet Layer

                  (C)  Transport Layer                            (D)  Presentation Layer

 

             b.  FTP stands for  ______.

 

                  (A)  File Transport Protocol                 

                  (B)  File Transfer Protocol

                  (C)  File Transfer Program               

                  (D)  Form Transfer Protocol

 

             c.  HTTP stands for ____.

 

                  (A)  High Traffic Transfer Protocol          

                  (B)  Hyper Transaction Text Protocol  

                  (C)  Hyper Text Transfer Protocol       

                  (D)  High Text Transfer Protocol

 

             d.  Telnet is a service that runs

 

                  (A) Television on net                             (B)  Remote program

                  (C) Cable TV network                         (D)  Telenext

 

             e.  SMTP is a

 

                  (A) Networking Protocol

                  (B) Protocol used for transferring message between end user & Mail Server

                  (C) Protocol used for smart card message interchange

                  (D) Encryption Standard

 

             f.   A program segment is having the following statement:

                                int[] c = {};

                  What will be the value of c.length?

 

                  (A) 1                                                   

                  (B)  will raise NullPointerException

                  (C) 0                                                   

                  (D)  will raise ArrayIndexOutOfBoundsException

 

             g.  What will be the output of the following program?

                       public class E {

    static boolean flag;

    public static void main(String args[]) {

      if ( flag )

        System.out.println(flag);

}}

 

                  (A) Compiler error , boolean flag : variable flag may not have been initialized

                  (B) Compiler error , System.out.println ( flag ) : can't convert boolean to String

                  (C) false

                  (D) Compiles and runs fine with no output generated

 

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

 

                  (A)  Integer                                         (B) ArrayList

                  (C)  Boolean                                       (D) Character

 

             i.   When we implement the Runnable interface, we must define the method

 

                  (A)  run()                                              (B) init()

                  (C)  start()                                           (D) main()

 

             j.   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)          

 

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

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

 

             b.   What are the difference of TCP and ISO/OSI model?                                        (6)

 

             c.   What do you mean by SMTP? Discuss the role of SMTP in the context of mail application.                                                                       (4)

 

  Q.3     a.   As IPv6 contain multiple headers, how does it know where particular header ends and next item begins?                                                                (6)

 

             b.   Describe Network File System (NFS) for remote file access. What are its advantages over FTP?                                                              (6)

       

             c.   What are socket APIs? What are they used for?                                                 (4)

 

  Q.4     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?                                                                    (8)

 

              b.   Explain the meaning of following socket primitive:                                               (8)

                    BIND, LISTEN, ACCEPT and CONNECT.

 

  Q.5     a.   What do you understand by state information in CGI programs? Briefly explain with the help of examples, various types of state information.           (8)

 

              b.   Differentiate between ASP and JSP?                                                                  (4)

 

              c.   What is an interface? What is its use?     (4)

 

  Q.6     a.   How exceptions are handled in java? Explain with the help of suitable example.                                 (8)

 

             b.   Write an applet that sets the background colour to cyan and foreground colour to red and displays a message that illustrates the order in which various applet methods are called when an applet starts up. For example : inside init()…inside start()…                                                               (8)

 

  Q.7     a.   In Java method arguments, arguments with object references are passed by value, and not by reference. Explain the statement with proper example.                                                         (8)

 

             b.   Write a recursive method to calculate the sum of the following series for a given value of n:

                                                                                                                                                              (8)          

 

 

  Q.8     a.   Write an applet to display three buttons with labels Yes, No and Maybe. On pressing any button appropriate message must also be displayed. For example, on pressing Yes button, it should show “You pressed Yes”.   (8)

 

             b.   With the help of examples, explain the various types of layout managers in AWT.                  (8)

 

  Q.9           Write short notes on the following:

                   (i)   Thread class

                   (ii)  Wrapper classes

                   (iii) Remote Method Invocation

                   (iv) Collection interface                                                                           (4x4=16)