Tribhuwan University

Institute of Science and Technology

Model

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.
Discuss the concept of method overriding. Write a program to create Person class with variables id, and name. Include methods getPerson() and showPerson() in the class. Again, create another class named Employee, which is child of person class. Include member variable salary, and methods getEmployee(), and showEmployee() in the class. Again, create a third class named Typist, which is child of Employee. Include variable typespeed, and methods getTypist(), and showTypist() in the class. Finally, create two objects of Typist class and read and display their details.[10]
2.
Write a java program to create a UI with four labels and three text boxes for Principal, Time, Rate, and Interest. Also put two buttons "Simple Interest" and Reset in the form and handle the event accordingly.[10]
3.
How JSP differs from servlets? Discuss various methods of writing servlet programs with suitable example.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
What is method overloading? Explain with example. [5]
5.
Write a java program to read content from keyboard and write it to the file named test.txt in D: drive. [5]
6.
Discuss working of grid layout with example. [5]
7.
What is action command? How it is used in java programs? Explain with example. [5]
8.
Explain steps of JDBC with suitable example. [5]
9.
Write down a JavaFx program to create login form. [5]
10.
Write down a java program where client sends a number to server and server calculates its factorial and sends it back to client using TCP. [5]
11.
Discuss the steps of writing RMI programs. [5]
12.
Write short notes on a. Container Classes b. Scope of JSP Objects [5]