2025 Pre-Board examination question paper set 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.

2. Explain the role of constructor in Java class by considering a suitable example and also list the type of constructor.

3. Define inheritance? Explain types of inheritance with suitable example.

4. Explain steps in creation and implementation of package with example.

5. How does Java support inter-thread communication? Explain with example.

6. What is exception? Explain try-catch block with suitable an example.

7. Explain any five string functions in java.

8. What do you mean by method overriding? how you resolve such situation in java.

9. Create a GUI form in Java that allows users to select their gender using radio buttons and enter their age in a text field. On clicking Submit: Save the information to a file userdata.txt. If age field is empty, show a message: "Please enter your age."

10. Make a class Employee with a name and salary. Make a class Manager inherit from Employee. Add an instance variable, named department, of type string. Supply a method to string that prints the manager's name, department and salary. Make a class Executive inherit from Manager. Supply a method to String that prints the string Executive followed by the information stored in the Manager superclass object.

11. Develop object-oriented program to implement multiple inheritance using interface.