Official 2022 board examination paper for Object Oriented Programming in Java.

Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2025
Bachelor in Computer Applications

Paper detail Value
Course Object Oriented Programming in Java
Code No. CACS204
Semester IIIrd
Full marks 60
Pass marks 24
Time 3 hours

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

Group B

2. What is jagged array? Write a java program to initialize and display jagged array element with sum of each row.

3. What are uses of this keyword? Write a java program to implement method overloading concept.

4. Why inheritance is needed in java? How will you implement multiple inheritance using interface? Explain with program.

5. What is multithreading? Explain with program how you will create thread by implementing runnable interface and extending Thread class.

6. What are exception handling keyword in java? Write java program to illustrate the concept of NullPointerException and NumberFormatException.

7. What is serialization? Write a java program to write three student information (Roll, Name, Address, College) into file student.txt and display the student information whose address is Jhapa.

8. What is Wrapper class? Explain with program, how will you use iterator and comparator in collection objects?

Group C

9. What is difference between class and interface in java? Create a java class Time with three attribute hours, minutes and seconds. Use appropriate constructors to initialize instance variable. Use methods to display time in HH:MM:SS format, add and subtract two time object. Implement the class to add, subtract and display time object.

10. How AWT is differing from Swing? Write a GUI program using components to find factorial and cube of number. Use TextField for giving input and Label for output. The program should display factorial if user press mouse on result button and cube if user release mouse from result button.

11. What is JDBC? Write a java program to connect database Company and insert 5 employee record (EID, Ename, Salary, Department) in Employee table and display the employee record who's Department is "Sales".