Tribhuwan University

Institute of Science and Technology

2080

Bachelor Level / Fourth Year / Seventh Semester / Science

Bachelors in Information Technology (BIT401)

(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.
Why do we need interface? Define an interface named shape with area ( ) method. Create a class named Rectangle with length and breadth circle with radius that implements shape interface. Now create the object of both classes and display their area.[10]
2.
Write a Java program to create a UI with three labels and three text boxes for First Number, Second Number and Result. Also put Four buttons (Add, Subtract, Multiply, and Divide) in the form and handle the event accordingly.[10]
3.
What are the various tags used in writing JSP programs? How HTML forms can be processed using JSP? Explain with example.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Describe the chain of constructor with example. [5]
5.
Write a Java program to create a multi-threaded programs by extending Thread class. Create at least three threads. [5]
6.
What is layout manager? Explain working of flow layout with example. [5]
7.
Describe about exception handlings with example. [5]
8.
How prepared statements differs from statements? Explain use of prepared statements with example. [5]
9.
Discuss the steps of writing JavaFX programs. [5]
10.
Write a socket program using TCP where client sends an integer to server and server response whether it is positive or negative. [5]
11.
How distributed programs can be written in Java? Explain RMI architecture. [5]
12.
Write short notes on a. Final keyword b. Object class [5]