CSC409 Advanced Java Programming

Advanced Java Programming TU Board 2081 question paper

12 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Science in Computer Science and Information Technology

Semester 7 · TU Board 2081

Course Title: Advanced Java Programming (CSC409)

Full Marks: 60Pass Marks: 24Time: 3 hours

Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.

Group A

Attempt any TWO questions(2 × 10 = 20)

  1. 1.

    What is the task of the Listener interface? Write a socket program for a file server that makes a collection of files available for transmission to clients. When a client connects to the server, the server first reads a one-line command from the client. The command string can be of the form "GET <filename>", where <filename> is a file name. The server checks whether the requested file actually exists. If so, it first sends the word "OK" as a message to the client. Then it sends the contents of the file and closes the connection. Otherwise, it sends "ERROR" to the client as message and closes the connection. Assume that there is no sub directories.

    10
  2. 2.

    Differentiate between path and class path in Java. When do you prefer anonymous inner class? Consider the following program and answer the given questions.
    class A {
    class B {
    public void test() {
    int i = 0;
    while (i<=100){
    System.out.println(i);
    i = i + 2;
    }
    }
    }
    }

    Name the list of class file created after compiling above program
    Rewrite the above program using for loop

    10
  3. 3.

    What are the tasks of sliders and scroll pane? Explain any four types of layout manager.

    10

Group B

Attempt any EIGHT questions(8 × 5 = 40)

  1. 4.

    How does JavaFX hyperlink control format text that functions as button? Illustrate with an example.

    5
  2. 5.

    Describe any two types of events.

    5
  3. 6.

    How do you write an IDL file and generate the stub and skeleton code for CORBA implementation? Explain.

    5
  4. 7.

    Design a simple form that takes name, password, hobbies and gender as input.

    5
  5. 8.

    Assume that a text file named "ONE.TXT" contains a paragraph of text. Write a program to copy the word that starts with vowel from "ONE.TXT" to another file "TWO.TXT".

    5
  6. 9.

    What do you mean by SQL escape? Describe about scrollable and updateable result sets.

    5
  7. 10.

    Explain the life cycle of servlets.

    5
  8. 11.

    Write a program in JSP to display the string taken in one page in another page.

    5
  9. 12.

    How do you insert pop-up menu? Distinguish between GET and POST request.

    5

— The End —