Tribhuwan University

Institute of Science and Technology

2075

Bachelor Level / Fourth Year / Seventh Semester / Science

B.Sc in Computer Science and Information Technology (CSC419)

(Advanced Java Programming)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Design a GUI form using swing with a text field, a text label for displaying the input message 'Input any String', and three buttons with caption CheckPalindrome, Reverse, FindVowels. Write a complete program for above scenario and for checking palindrome in first button, reverse it after clicking second button and extract the vowels from it after clicking third button.[10]
2.
Why do we need to handle the exception? Distinguish error and exception. Write a program to demonstrate your own exception class.[10]
3.
Describe the process to deploy the servlet. Write a program to a JSP web form to take input of a student and submit it to second JSP file which may simply print the values of form submission.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
An array is called balanced if it's even numbered elements (a[0], a[2], etc) are even and its odd numbered elements (a[1], a[3], etc) are Odd. Write a function named isBalanced that accepts an array of integers and returns 1 if the array is balanced otherwise it returns 0. [5]
5.
Explain the significance of cookies and sessions with suitable example. [5]
6.
Define the chain of constructor. What is the purpose of private constructor? [5]
7.
Describe the process to run the RMI application. [5]
8.
How prepared statements are different with statement? List the types of JDBC driver. [5]
9.
Write down the life cycle of thread. Write a program to execute multiple threads in priority base. [5]
10.
When do we use final method and final class? Differentiate between function overloading and function overriding. [5]
11.
Give any two differences between class and bean. Write the steps to create JAR files. [5]
12.
What is a socket? Write client and server programs in which a server program accepts a radius of a circle from the client program. Computes area, sends the computed area to the client program, and displays it by client program. [5]
13.
Write short notes on: a. Grid Layout b. Ragged Array [2.5+2.5]