CS-74: Introduction To Internet Programming-June,2006

  JHARKHAND BOARD You are here
BACHELOR IN COMPUTER APPLICATIONS

Term-End Examination

June, 2006

CS-74 : INTRODUCTION TO INTERNET PROGRAMMING

Time : 3 hours Maximum Marks : 75

Note : Question number 1 is compulsory. Attempt any three questions from the rest.

1. (a) Differentiate between nested and inner classes. Explain this through appropriate examples of each.(8)

(b) "We can have void as return type for the constructor of a class." Is this true or false ? Give reasons for your answer. (2)

(c) Answer the following questions in brief : (5)

(i) finalize() is always followed by which access specifier ?

(ii) Which special class is a superclass of all other classes in Java ?

(iii) join() method belongs to which class ?

(iv) Which operator is used for unsigned right shift ?

(v) How many bits does short data' type contain ?

(d) Super( ) must be the first statement executed inside the subclass constructor. Why ? Explain uses of the keyword `super', with an example.(4)

(e) What is the role of a default exception handler in Java ? Differentiate between `throw' and `throws'.(4)

(f) Write, an applet that reads two floating point numbers, and displays their sum. (7)

2. (a) Differentiate between the following, using examples : (9)

(i) Transient and Volatile keywords

(ii) and equals()

(iii) abstract class and interface

(b) What is a package in Java ? Also write steps to create a package in Java. (3)

(c) Assume that a class A extends a class B, which further extends class C. Also all the three classes implement the method test( ). How can a method in class A invoke the test( ) method defined in class C (without creating a new instance of class C) ? Explain. (3)

3. (a) What are threads ? What are the two ways in which threads can be created in Java ? Explain each one through an appropriate program. (6)

(b) Give the output of the following program code, and an explanation of its functioning .(4)

public Class Test (

public static void main (string args[ ]) {

int i,j=1;

i=(j>1)?2:1;

switch (i) {

case 0 System. out. println("0"); break;

case 1 System. out. println("1");

case 2 : System. out.println("2");

case 3 System. out.println("3"); break;

}

}

}

(c) Write a program that reads the data from one file and writes into another file.(5)

4. (a) Explain the following terms in AWT package : (4)

(i) Frame

(ii) Panel

(iii) Component

(iv) Container

(b) Explain the StringBuffer length and capacity methods, using an example. (4)

(c) Differentiate between method overloading and method overriding. Explain dynamic method dispatch in this context. (5)

(d) Explain the Event Delegation Model. (2)

5. (a) Explain static methods and static variables. What are the restrictions on static methods?(5)

(b) Write a program in Java to print the following pattern for a given integer n. (6)

n = number of lines.

(c) What are applets in Java ? Explain the 'applet

skeleton', using an example.



  « CS-74: Introduction To Internet Programming-December,2006 Question Bank 2008 (Gujrati medium) »  

  Posted on Thursday, December 4th, 2008 at 12:59 PM under   JHARKHAND BOARD | RSS 2.0 Feed