Object Oriented Programming in Java 2022

Question Paper Details
Tribhuwan University
Faculty of Humanities and Social Sciences
OFFICE OF THE DEAN
2022
Bachelor of Computer Applications
Course Title: Object Oriented Programming in Java
Code No: CACS204
Semester: Third Semester
Full Marks: 60
Pass Marks:
Time: 3 hours
Candidates are required to answers the questions in their own words as far as possible.

Group B

Official Answer
AI Generated Answer

AI is thinking...

Attempt any SIX questions.

Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Group C

Official Answer
AI Generated Answer

AI is thinking...

Attempt any TWO questions.

Official Answer
AI Generated Answer

AI is thinking...

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 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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.

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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 in "Sales".

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

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

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...