CACS204 Object Oriented Programming in Java

Object Oriented Programming in Java TU Board 2025 question paper

10 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Computer Application

Semester 3 · TU Board 2025

Course Title: Object Oriented Programming in Java (CACS204)

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

Candidates are required to answer the question in their own words as far as possible.

Group B

Attempt any SIX question.(6 × 5 = 30)

  1. 2.

    What is command-line arguments? Write a program to accept two numbers and display their sum using command-line arguments.

    5
  2. 3.

    Write a program to demonstrate exception handling of ArrayIndexOutOfBoundsException.

    5
  3. 4.

    What is string immutability? Explain with an example.

    5
  4. 5.

    Write a program to create multiple threads and execute them concurrently.

    5
  5. 6.

    Explain the Serializable interface in java with an example.

    5
  6. 7.

    What is multiple inheritance? Explain how multiple inheritance is implemented in Java?

    5
  7. 8.

    What is JDBC? Explain its architecture.

    5

Group C

Attempt any TWO questions(2 × 10 = 20)

  1. 9.

    Explain nested and inner classes in java with examples. Discuss the scenarios where inner classes are useful.

    10
  2. 10.

    Create a class Person (with attributes name and age, and a method display()). Derive a class Employee from Person with additional attributes employeeId and salary. Use constructors and override the display() method to include all details.

    10
  3. 11.

    Build a form with Passenger Name, Flight Number, Seat Preference (Window, Aisle, Middle), and a checkbox for "I agree to baggage rules." Clicking Confirm Booking should save data to "flight.txt" if rules are accepted otherwise display "Accept baggage rules first." [figure in the original paper]

    10

— The End —