AMIETE – CS (OLD SCHEME)

 

Code: AC19                                                   Subject: INTERNET & JAVA PROGRAMMING

Flowchart: Alternate Process: DECEMBER 2009Time: 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 the best alternative in the following:                                   (2x10)

 

             a.  Presentation layer is present in?

 

                  (A) TCP/IP                                          (B) OSI model

                  (C) Both (A) & (B)                              (D) none of these

 

             b.  User Datagram Protocol (UDP) provides ____________

 

                  (A)Reliable service                               (B) Fast data transfer

                  (C)Both                                                (D) None of these

 

             c.  Which of the following is Class C IP Address?

 

                  (A) 125.255.255.254                           (B) 193.255.255.254

                  (C) 190.255.255.254                           (D) 225.255.255.254

       

             d.  Which is true in context  of java?

 

                  (A) platform independent                      (B) multithreaded

                  (C) robust                                            (D) All of them

 

             e.  Which of the following class is called parent class of all the classes?

 

                  (A) Class                                              (B) String

                  (C) Thread                                           (D) Object

 

             f.   Throwable is a

 

                  (A) Package                                         (B) Interface

                  (C) Keyword                                       (D) class

 

             g. Synchronize keyword is used before

 

                                                                              (A) Variable name                     (B) Method Name

                  (C) Class name                                     (D) all of them

 

             h.  Which class contains sorted objects?

 

                  (A) Vector                                           (B) Hashtable

                  (C) HashTree                                       (D) Collections

 

 

             i.   Which package contains BufferedInputStream class?

 

                                                                              (A) java.lang                                        (B) java.util

                  (C) java.io                                            (D) java.net

 

             j. The character set of java language is

 

                  (A) Unicode character set                     (B) EBCDIC character set

                  (C)  ASCII character set                      (D) none of these

 

 

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

  Q.2     a.   What are the differences between TCP and UDP protocol? Explain in detail.                                                                     (8)

 

             b.   What is IP  address?  What are the different types of IP Addresses, discuss       about them.                                                           (8)

 

  Q.3     a.   What do you mean by Client-Server Architecture?                                             (4)

 

             b.   Compare LAN, MAN, WAN.                                                                          (4)

       

             c.   Write short note on the followings                                                                   (2*4)

                   (i)   Hypertext                          (ii) Hypermedia

                   (iii) HTML                                           (iv) JSP

 

  Q.4     a.   Explain with the help of diagram(s), working of DNS server.                               (8)

 

             b.   What is Serialization? Write a program in Java for serializing an object.              (8) 

 

  Q.5     a.   What do you mean by access modifier. What are the access modifiers available in java? Discuss about them with skeleton code.      (8)

 

             b.   What is runtime and compile time polymorphism in Java.  Discuss about them with appropriate examples.              (8)

 

  Q.6     a.  What is output of the following code segment?                                                     (4)

 

                                          class Base

                                          {

                                                      public void show()

                                                      {

                                                        System.out.println(“in base class”);

                                                      }

                                                      public void look()

                                                      {

                                                      System.out.println(“Look in base”);

                                                      }

                                          }

 

 

 

                                          class Derive extends Base

                                          {

                                                      public void show()

                                                      {

                                                      System.out.println(“in derive”);

                                                      }

                                          }

                                          public class Test

                                          {

                                                      public static void main(String args[])

                                                       {

                                                         Base B=new Derive();

                                                         B.show();

                                                         B.look();

                                                      }

                                 }

 

             b.   What is recursion? Write a program for n factorial using recursion.                      (6)

 

             c.   Explain ‘this’ and ‘super’ keywords in java.                                                        (6)

 

  Q.7     a.   Write an applet that echoes “KEY UP” or “KEY DOWN” in the status bar of the window depending upon whether up or down arrow key is pressed.  No action is to be taken for other key presses. (8)

 

             b.   Briefly explain and show the class hierarchy for the following elements in AWT: Component, Container, Panel, Window, Frame and Canvas.    (8)                                                             

       

  Q.8     a.   Define the methods init(), service(), destroy() in the context of servlet.                 (4)

 

             b.   Discuss the life cycle of Applet             (6)

 

             c.   Compare active, static and dynamic web documents.                                          (6)

 

  Q.9     a.   What is RMI? Write a sample RMI server and client program.                            (8)

 

             b.   What is Socket? Explain it.                                                                                 (4)

 

                   c.        Write short notes on Java Beans.                                                                            (4)