CS3391 OOP Object Oriented Programming
Important Questions
Unit 1
1) Explain the characteristics of OOPs.
2) Explain the features and characteristics of JAVA.
3) What is JVM? Explain the internal architecture of JVM with neat sketch.
4) What is class? How do you define a class in java?
5) Explain the object constructors and calling other constructor with example.
6) Describe the static fields and methods used in Java.
7) Describe the concept of Arrays in Java.
8) Write a Java program to perform matrix multiplication using arrays.
9) Develop a java program to find a smallest number in the given array by creating one dimensional array and two dimensional array using new operator.
10) Write a program to find whether a number is a palindrome or not.
11) Explain the types of constructor with examples.
12) What is method? How method is defined? Give example.
13) Explain the selection statement in Java using suitable examples.
14) Write a Java code using do-while loop that counts down to1 from 10 printing exactly ten lines of ‘hello’
15) State the purpose of finalize() method in java? With an example explain how finalize() method can be used in java program.
Unit 2
1) Define Inheritance. With diagrammatic illustration and java programs illustrate the different types of inheritance with an example
2) Explain hierarchical and multi-level inheritances supported by Java and demonstrate the execution order of constructors in these types
3) Give an elaborate discussion on inheritance.
4) Explain the concept of Abstract classes.
5) What is an Abstract class? Illustrate with an example to demonstrate abstract class
6) What is meant by interface? How it is declared and implemented in JAVA. Give example.
7) Explain simple interface and nested interfaces with examples
Unit 3
- Define Exception and explain its different types with example?
- What is meant by Exceptions? Why it is needed “Describe the exception hierarchy. Write note on Stack Trace Elements. Give example.
- Write a note on built-in exceptions.
- Give an example for nested try statements in Java source file and explain
- Explain briefly about Assertion and Logging?
- Define threads. Describe in detail about thread life cycle.
- How to extend the thread class? Give an example.
- What is synchronization? Explain the different types of synchronization in Java
Unit 4
1) Explain the classes under 2D shapes. Working with 2D Shapes.
2) Use graphics objects to draw an arc and a semicircle inside a rectangular box.
3) Sketch the hierarchy of Java AWT classes and methods. Create a ‘checkbox’ using these classesand methods.
4) Explain event handling with examples.
5) Give the methods available in graphics for COLOR and FONTS.
6) Explain about the concepts of creating and positioning of frame.
7) Define Event Handling. Write a program to handle a button event.
8) State and explain the basic of AWT Event handling in detail.
Unit 5
1) Elaborately discuss the components of graphics programming. Illustrate the basics of event handling.
2) Describe the types of layout Management and Swing Components briefly.
3) (i) Explain the basics of Event Handling.(6)
(ii) Write a simple program to demonstrate the mouse events. (6)
(iii)Discuss the adapter class using example. (4)
4) Discuss mouse listener and mouse motion listener. Give an example program.
5) What is Swing Component? Write a Java program by using major of the swing component with output.