CACS204 Object Oriented Programming in Java

Object Oriented Programming in Java TU Board 2020 question paper

10 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Computer Application

Semester 3 · TU Board 2020

Course Title: Object Oriented Programming in Java (CACS204)

Full Marks: 60Pass Marks: 24Time: 3 hours

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

Group B

Attempt any SIX question.(6 × 5 = 30)

  1. 2.

    Define OOP. Write the characteristics of OOP language.

    5
  2. 3.

    Explain the operators available in Java programming.

    5
  3. 4.

    Define loop. Write a java program to print first n prime numbers.

    5
  4. 5.

    Differentiate between abstract class and interface with suitable example.

    5
  5. 6.

    Define access modifier. Explain access modifiers in java with example.

    5
  6. 7.

    Define exception. Explain exception handling mechanism in java with example.

    5
  7. 8.

    Write short note on (Any Two); a) Final keyword b) Collection class c) JDBC

    5

Group C

Attempt any TWO questions(2 × 10 = 20)

  1. 9.

    a) Write a program to create and use java package. b) Define thread. Explain the life cycle of thread.

    10
  2. 10.

    a) Write a program to sort name of any five cities in ascending order. b) Define polymorphism. How do we achieve polymorphism in java explain with examples?

    10
  3. 11.

    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 calculate square of entered number.

    10

— The End —