2080 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. What is constructor? Explain the role of constructor in Java class by considering a suitable example and also list the types of constructor.

3. Differentiate among super, abstract class and interface with suitable example.

4. Define the terms Method overloading and Method overriding. Explain the use of "extends" keyword in java.

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 keywords in Java? Explain exception handling mechanism in java with example.

7. What is serialization and deserialization? Write a Java program to write three student information (stu_Roll, stu_Name, stu_Address, stu_College) into file pkstudent.txt and display the student information whose address is kathmandu.

8. Differentiate between byte stream and character stream. Write a program to copy the content of a file to another file using streams.

9. a) Define Collection Class. Explain different Wrapper classes and associated methods in java. b) List and explain any five String methods used in Java with examples.

10. a) Differentiate between java AWT and java Swing. Explain the different types of layout managers in java GUI programming. b) Write a java GUI program to check the given number is palindrome or not.

11. Define JDBC. Write a Java program to connect to a database Library and insert book details (BookID, Title, Author, Price) into the Books table. After inserting, display all books whose price is greater than NRs.500.