OOP in Java — CACS204 (3rd Sem)

Tribhuvan University BCA · 3rd Semester · CACS204 · 2021

Extracted text (for search)

Plain text pulled from the file — layout, tables and diagrams don't survive extraction. For the real thing, use the viewer above.

GN : : , pe Set Tribhuvan Universi ae eS 1 Ueeey - Coe | | Faculty of Humanities & Social Sciences : LEE ala TN OFFICE OF THE DEAN | | a . 2021 - ~ Bachelor in Computer Applications Full Marks: 60 Course Title: OOP in Java | : Pass Marks: 24 Code No: CACS204 Time: 3 hours Semester: III Batch: 2020 Candidates are required to answer the questions in their own words as far as possible. Group B Attempt any SIX questions. [6x5 = 30] ~2(° What is jagged array? Write a java program to initialize and display jagged array element with sum of each row. [1+4] ose at are uses of this keyword? Write a java program to implement method overloading concept. [2+3] _Why inheritance is needed in java? How will you implement multiple inheritance using interface? Explain with program. [1+4] ‘What is multithreading? Explain with program, how you will create thread by implementing runnable interface and extending Thread class. [1+2+2] oe What are exception handling keyword in java? Write java program to illustrate the concept of ‘\\ NullPointerException and NumberFormatException. | [1+2+2] TX 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. [1+4] (8) What is Wrapper class? Explain with program, how will you use iterator and comparator in collection objects? [1+2+2] . Group C Attempt any TWO questions. [2x10 = 20] 9. What is difference between class and interface in java? Create a java class Aime 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. [3+7] 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. [4+6] 11. What is JDBC? Write a java program to connect database Company and insert 5 employee record (Eld, Ename, Salary, Department) in Employee table and display the employee record who’s Department is “Sales”. [2+4+4] oa Ve iS More oe

More 3rd Semester

comments