DipIETE – CS (NEW SCHEME)     Code: DC60

 

Subject: JAVA AND WEB PROGRAMMING

Flowchart: Alternate Process: JUNE 2010Time: 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, selecting THREE questions from Part A and TWO questions from Part B. 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:                                  (210)

                

 

             a.  Size of character data type in Java language is _________ bytes. 

 

 

                  (A) 2                                                    (B) 4

                  (C) 8                                                    (D) 1

 

             b. Which of the following type of inheritance is not present in Java? 

 

                  (A) Multiple                                          (B) Multilevel

                  (C) Single                                             (D) All these are present

 

             c.  What is the correct ordering for import, class and package declarations when found in the single file?

 

                  (A) package, import, class                   

                  (B) class, import, package

                  (C) import, package, class                   

                  (D) package, class, import.

 

             d.  ________ is not a valid value for text-align style property

 

                  (A) Left                                                (B) Right

                  (C) Center                                            (D) Horizontal

 

             e.  Which of these statements is true?

 

                  (A) All classes must define a constructor.                                                                          

                  (B) A constructor can be declared private.

                  (C) A constructor can declare a return value.                                                                     

                  (D) A constructor must initialise all the member variables of a class.

 

             f.   A client side scripting language 

 

                  (A) Java                                               (B) C++

                  (C) Java script                                      (D) HTML


 

g. What will be the result of the expression a % b when a and b are of type int and their values are a = 17 and b = 6?

 

                  (A) 5                                                    (B) 23

                  (C) 5                                                 (D) None of these.

 

h.  Polymorphism is extensively used in implementing ________.

 

(A)  encapsulation                                  (B) data hiding

                  (C) inheritance                                      (D) all of these.

 

             i.   CSS stands for 

 

                  (A) Cascading Style Sheets                   (B) Controlling Style Sheets

                  (C) Concept Style Sheets                     (D) Covered Style Sheets

 

             j.   When the code to be linked with the call is known at compile time that situation is called as _________. 

 

                  (A) binding                                           (B) late binding

                  (C) static binding                                  (D) dynamic binding.

 

 

 

PART A

Attempt any THREE questions. Each question carries 16 marks.

 

 

 

  Q.2     a.  Explain at least eight of the java language features.                                                (8)

 

             b. What is a token?  List the various types of tokens supported by Java.                  (8)

            

  Q.3     a.   What are the data types present in Java? Explain with the help of examples.                                    (8)

             b.   Write a program to determine the sum of the following for a given value of n:

                  

                   The value of n should be given interactively through the keyboard.                       (8)

 

  Q.4     a.   Explain method overloading and static member concepts in Java with examples.                  (8)

             b.   How are two-dimensional arrays declared in Java? Write a program to print multiplication tables from 1 to 10 using two-dimensional arrays.          (8)

       

  Q.5     a.   What do you mean by interfaces? Write an example, which shows how to declare and use interfaces.                                                                    (8)

 

             b.   With a neat diagram explain the life cycle of a thread in Java.                                                          (8)

Q.6     a.   Explain the following keywords of Java exception literature:-

                                                                                                                                          (8)

                 (i)   try and catch   

                 (ii)  throw 

                 (iii) finally

 

           b.   Write the hierarchy of input stream classes in Java with a brief description for each class.    (8)

 

 

PART B

Attempt any TWO questions. Each question carries 16 marks.

 

            

  Q.7     a.   Explain the various steps of Web Development Process.                                     (8)

 

             b.   List and explain the core attributes of XHTML. What is the difference between block level and inline elements?                                                                                                     (6+ 2)

 

  Q.8     a.   Explain Server Side Includes (SSI) with an example.                                          (8)

 

             b.   Explain the six concrete steps of Information Architecture (IA).                           (8)

 

Q.9       a.   What is CGI? Which are the two methods of sending information to server using forms? Explain them briefly.                                                                                                                     (3+5)

 

             b.   Briefly explain the three components of CSS. Write the JavaScript to display current time on the client browser.                                                                                                       (6+2)