Kongunadu College of Engineering and Technology

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY

NAMAKKAL-TRICHY MAIN ROAD, THOTTIAM, TRICHY -621 215

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


REGULATION – 2017
YEAR/SEM: II/III
SUBJECT CODE & NAME: CS8392 & OBJECT ORIENTED PROGRAMMING
QUESTION BANK
UNIT I
PART A

1. What are the OOP Principles?


2. What is Encapsulation?
3. What is Polymorphism?
4. What is Inheritance?
5. What are the features of Java Language?
6. What is the need for Java Language?
7. Give the contents of Java Environment (JDK).
8. What are the different types of comment symbols in Java?
9. What is the use of final keyword?
10. What are the different types of operators used in Java?
11. What is the need for static variables?
12. What is the general form of a class?
13. What is the use of new keyword?
14. If ObjA1 is an object of class A created using new keyword, What does the statement A
ObjA2=ObjA1; mean?
15. What is a constructor?What is the difference between a constructor and a method?
16. What is the use of this keyword?
17. What are destructors?How is object destruction done in Java?
18. What is method overloading?
19. What is a String in Java?What is the difference between a String in Java and String in C/C++?
20. Name a few String methods.
21. How does String class differ from the String Buffer class?
22. What is the default access specifier in Java?
23. What is a package in Java?Name some Java API Packages.
24. Name some JavaDoc Comments.
25. What is CommandLine Arguments.

Part B

1. Explain OOP Principles.Explain the features of Java Language.


2. Explain Constructors with examples.
3. Explain the methods available under String and String Buffer Class.
4. Explain Packages in detail.
5. Discuss the methods under Array Class.
6. Discuss some of the classes available under Lang package.
7. Explain method overriding with example program.
KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY
NAMAKKAL-TRICHY MAIN ROAD, THOTTIAM, TRICHY -621 215

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


8. What is javaDoc? Explain the comments for classes, methods, fields and link.
9. Application Programs in Java.
10. Write constructors, methods and access specifiers.

UNIT II
PART A

1. Define Inheritance.What are the types of inheritance?


2. How is multiple inheritance achieved in java?
3. What is the use of super keyword?
4. Differentiate overloading and overriding.
5. Define polymorphism.
6. Differentiate static binding and dynamic binding.
7. When will a method be declared final?
8. What is an abstract class? What is the need for abstract classes?
9. Explain about protected visibility control.
10. What are the methods under "object" class / java.lang.Object.
11. Explain toString method of object class.
12. How will you create an instance of Class.
13. What are the methods under reflection used to analyze the capabilities of classes?
14. How to create arrays dynamically using reflection package.
15. Define an interface.What is the need for an interface?
16. What are the properties of an interface?
17. Differentiate Abstract classes and interface.
18. What is object cloning?Differentiate cloning and copying.
19. Differentiate shallow copy and deep copy in cloning.
20. Does Inheritance removes any fields/or methods of super class?
21. What is nested class? Mention its types.
22. What is inner class? What is the need for inner classes?
23. What are the rules for inner class?
24. What is local inner class and anonymous inner class? Give their advantages.
25. Write the advantages and disadvantages of static nested class.

PART B

1. Explain the concept of inheritance and its types.


2. Define an interface. Explain with example.
3. What is object cloning? Explain deep copy and shallow copy with examples.
4. Develop a message abstract class which contains playMessage abstract method. Write a
different sub-classes like TextMessage, VoiceMessage and FaxMessage classes for to
implementing the playMessage method.
5. Develop a abstract Reservation class which has Reserve abstract method. Implement the sub-
classes like ReserveTrain and ReserveBus classes and implement the same.
KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY
NAMAKKAL-TRICHY MAIN ROAD, THOTTIAM, TRICHY -621 215

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


6. Develop an Interest interface which contains simpleInterest and compInterest methods and
static final field of Rate 25%. Write a class to implement those methods.
7. Develop a Library interface which has drawbook(), returnbook() (with fine), checkstatus() and
reservebook() methods. All the methods tagged with public.
8. Develop an Employee class which implements the Comparable and Cloneable interfaces.
Implement the sorting of persons (based on name in alphabetical). Also implement the shallow
copy (for name and age) and deep copy (for DateOfJoining).
9. Explain the different methods supported in Object class with example.
10. Explain the Methods supported in reflect package. Also write a program to implement the
reflection of a particular class details like constructors, methods and fields with its modifiers.
11. Develop a static Inner class called Pair which has MinMax method for finding min and max
values from the array.

UNIT III
PART A

1. What are Checked and UnChecked Exception?


2. What are checked exceptions?
3. What are runtime exceptions?
4. What is the difference between error and an exception?
5. What classes of exceptions may be caught by a catch clause?.
6. How to create custom exceptions?
7. What are the different ways to handle exceptions?
8. What is the purpose of the finally clause of a try-catch-finally statement?
9. Is it necessary that each try block must be followed by a catch block?
10. How does Java handle integer overflows and underflows?

PART B

1. Explain generic classes and methods.


2. Explain exception hierarchy.
3. What are the advantages of Generic Programming?
4. Explain the different ways to handle exceptions.
5. How Java handle files?
6. Explain Stack Trace Elements.
7. Differentiate Input / Output Basics and streams.
8. Illustrate Byte streams and Character streams
9. Reading and Writing Console : Justify
10. Give example program for Reading and Writing Files.
KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY
NAMAKKAL-TRICHY MAIN ROAD, THOTTIAM, TRICHY -621 215

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


UNIT IV
PART A

1. Describe synchronization in respect to multithreading.


2. Explain different way of using thread?
3. What is synchronization and why is it important?
4. What are synchronized methods and synchronized statements?
5. What is daemon thread and which method is used to create the daemon thread?
6. What kind of thread is the Garbage collector thread?
7. What is a thread? What is a daemon thread?
8. What are the different level lockings using the synchronization keyword?
9. What are the ways in which you can instantiate a thread?
10. What are the states of a thread?
11. What are the threads will start, when you start the java program?
12. What are the different identifier states of a Thread?
13. Why do threads block on I/O?
14. What is synchronization and why is it important?
15. What is generic programming?

PART B

1. Explain the different states of a thread.


2. Explain thread synchronization with examples.
3. Explain the algorithm used for thread scheduling.
4. Describe multi threading.
5. Explain Deadlocks.
6. Illustrate synchronizing threads.
7. Give a profram for Inter-thread communication.
8. Explain daemon threads, thread groups.
9. What are Generic Programming and explain Generic classes.
10. Compare generic methods.

UNIT V
PART A

1. Draw the inheritance hierarchy for the frame and component classes in AWT and Swing.
2. What are the advantages of using swing over awt?
3. How do achieve special fonts for your text? Give example.
4. Give the syntax of drawImage() and copyArea() methods.
5. What is Adapter class?
6. Draw the AWT event Hierarchy.
7. What are the swing components?
8. What are the methods under Action Interface.
9. What are the methods under WindowListener Interface.
10. What is the difference between Swing and AWT?
KONGUNADU COLLEGE OF ENGINEERING AND TECHNOLOGY
NAMAKKAL-TRICHY MAIN ROAD, THOTTIAM, TRICHY -621 215

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

PART B

1. Explain the classes under 2D shapes.


2. Explain event handling with examples.
3. Explain action event with an example.
4. What are the swing components. Explain.
5. Describe the AWT event hierarchy.
6. Explain AWT event hierarchy
7. Illustrate Swing – layout management.
8. Explain Swing Components with Text Areas.
9. Describe Buttons- Check Boxes – Radio Buttons – Lists- choices.
10. Outline Scrollbars – Windows –Menus – Dialog Boxes.

You might also like